Nos78 / MrData

Discord Bot providing some simple scoring using postgres
GNU General Public License v3.0
3 stars 1 forks source link

New feature, ignoreMyself, operates on a server-wide basis #5

Closed Nos78 closed 5 years ago

Nos78 commented 5 years ago

A counter, ignoreMyself (and ignoreMaximum) was recently added to the client object, allowing the bot to programatically determine whether it should ignore X number of subsequent commands. However, this will prove problematic when the bot is running on more than one server.

The counter should be moved into a collection, indexed by guild key. This will allow a counter to be set for each individual server. The guild.id is easily obtained during the 'message' event, using message.guild.id