Added a new Gamba command suite. This works a lot like Polls, but you bet tokens. This adds the !gamba, !bet, and !resolve commands
The Poll system is much nicer. It now features live-updating messages and will keep track of the poll state between restarts
Removed the ignore/unignore commands. See below for new functionality
Added !remind command to send you a reminder at a specified future date
Removed the Bug, Fundraising, and Overwatch command suites
New API Features:
Command arguments are now handed as individual arguments instead of attributes on an args namespace object
Refactored the old add-commands-as-a-weird-function to CommandSuite objects. These are a Beymax equivalent to Discord.py's Cogs
Added migrations as a Bot hook. Migrations run once on the after:ready event.
Added a new dispatch_future system to dispatch arbitrary events at any date/time. Beymax guarantees that events will be dispatched at most 30 seconds after the scheduled time
Switched to Async-safe DBView class instead of old Databases. DBView is a robust class to get race-free write access to specific database tables, while allowing read access to the rest of the database.
Known Bug:DBView is not reentrant, and can therefore cause deadlock if a called function attempts to gain write access to a table that the caller currently has locked. Be careful!
All users who have ever had a balance of tokens accrue one token per day. If you are at a zero or negative balance, you will reset to 1 token instead of just gaining one
The ignore_role config option now works differently:
Instead of being applied to ignored users, Beymax will ignore all users who have this role
Can be either a single roll name/ID or a list
On startup or on creation/deletion of roles, Beymax will reparse this information
As soon as a user has one of these roles granted/revoked, Beymax will update its behavior accordingly
Added _dropdb command to, well, drop database tables
Added _sudo command to allow you to send messages and have Beymax interpret them as being from another user.
Known limitation: If you are sudoing as Beymax, you can only send commands, not arbitrary messages. Non-command messages will be ignored by Beymax internally
Renamed CoreBot to Client
Tasks can now dynamically set their own intervals on the fly
Permissions are now parsed more intelligently, and Beymax tracks the state of user/role name -> ID mappings in case users change their
wait_for('message', ...) now preempts special message handlers. This resolves an issue with games where a message would be handled as input to the game, and as a response to a prompt from beymax
The task runner is now a coroutine, instead of a background thread. It also dynamically adjusts its interval to minimize overshoot on scheduled tasks
Added $EMOJIFY interpolator key. This substitutes to an empty string but will enable replacing :emoji: with appropriate unicode characters. This behavior will become default in the future
Other Changes:
Update discord.py to 1.6.0. I know 1.7.X is out, by now, but that is going to be a smaller UTH update
Renamed everything internally from server(s) to guild(s) to match Discord API change
Cleaned up the BaseGame code, and added an attribute to provide instructions for your game
Got rid of XP and levels
Polished a lot of the blackjack code
Improved message parsing and score detection of the Z-machine story system
Slight improvements to the help system
The Party system was refactored to use the new future-dispatch feature instead of having a periodic task
Removed the __qualname__ entry in the task list
Fixed a bug where coroutines subscribed to multiple events could only unsubscribe from the most recently subscribed event
Moved much of Beymax's startup sequence into a one-time event subscription instead of overriding on_ready
New End-User Features:
!gamba
,!bet
, and!resolve
commands!remind
command to send you a reminder at a specified future dateNew API Features:
CommandSuite
objects. These are a Beymax equivalent to Discord.py's Cogsafter:ready
event.dispatch_future
system to dispatch arbitrary events at any date/time. Beymax guarantees that events will be dispatched at most 30 seconds after the scheduled timeDBView
class instead of old Databases.DBView
is a robust class to get race-free write access to specific database tables, while allowing read access to the rest of the database.DBView
is not reentrant, and can therefore cause deadlock if a called function attempts to gain write access to a table that the caller currently has locked. Be careful!ignore_role
config option now works differently:_dropdb
command to, well, drop database tables_sudo
command to allow you to send messages and have Beymax interpret them as being from another user.CoreBot
toClient
wait_for('message', ...)
now preempts special message handlers. This resolves an issue with games where a message would be handled as input to the game, and as a response to a prompt from beymax$EMOJIFY
interpolator key. This substitutes to an empty string but will enable replacing:emoji:
with appropriate unicode characters. This behavior will become default in the futureOther Changes:
server(s)
toguild(s)
to match Discord API change__qualname__
entry in the task liston_ready