daffy

Duck hunting game bot. Ducks appear at random intervals; players race to shoot them. Scores are stored in SQLite. The hunt auto-stops after a configurable number of rounds with no participants.

Dependencies

No external libraries required.

Commands

Game (anyone in channel)

CommandDescription
!bangFire at the current duck
!reloadRefill ammo (3-second cooldown)
!scoreTop 5 players for this channel
!score clearClear scores for this channel (owner/op)

Owner can also use !score clear all or !score clear #channel from PM.

Hunt control (owner / op)

CommandDescription
!huntShow hunt state (on/off/active, idle counter)
!hunt startStart the hunt
!hunt stopStop the hunt
!hunt idle <N>Set empty-round auto-stop threshold (0 = never); takes effect immediately if threshold is already met

Admin (owner)

CommandDescription
!join #channelJoin a channel
!part [#channel]Leave a channel
!chansList channels
!helpShow usage (PM)

How it works

- A duck spawns every spawn_min to spawn_max seconds (random, default 1-5 minutes). - First player to !bang scores a point. Each player has one shell; use !reload to reload. - !bang and !reload are ignored while the hunt is off. - If no one shoots within flee_time seconds (default 45), the duck flees and the round is marked empty. - After idle_rounds consecutive empty rounds the hunt auto-stops.

Config keys

KeyDefaultDescription
[daffy] db_path~/daffy_scores.dbPath to SQLite scores database
[daffy] idle_rounds3Empty rounds before auto-stop (0 = never)
[daffy] spawn_min60Minimum seconds between duck spawns
[daffy] spawn_max300Maximum seconds between duck spawns
[daffy] flee_time45Seconds before an unshot duck flees