diff options
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -108,5 +108,22 @@ async def on_message(message): db.playwithme.remove({"player": message.author.id}) await cli.send_message(message.channel, "Canceled all notifications.") + # + # "play" role Discoid backwards compatibility + # + if msg.startswith("\\getrole play"): + # toggles the "play" role + print("toggled " + message.author.name + "'s play role") + for role in message.author.roles: + if role.name == "play": + await cli.remove_roles(message.author, role) + await cli.send_message(message.channel, "Removed the 'play' role.") + return + + for role in message.server.roles: + if role.name == "play": + await cli.add_roles(message.author, role) + await cli.send_message(message.channel, "Added the 'play' role.") + threading.Timer(10 * 60, cleanup).start() cli.run(TOKEN) |
