diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-12-01 20:07:02 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-12-01 20:07:02 +0100 |
| commit | 1ed7826e21222f370e8d2c1b3405818ee13b9734 (patch) | |
| tree | 6e4b178109bbfc5f3ffbd1bbd67e9b4c620c71db | |
| parent | 31c3e0d00418fae31517e49784ad416761e3335b (diff) | |
| download | Vainbot-1ed7826e21222f370e8d2c1b3405818ee13b9734.tar.gz Vainbot-1ed7826e21222f370e8d2c1b3405818ee13b9734.zip | |
added legacy 'play' role support
| -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) |
