diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-01 19:53:51 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-01 19:53:51 +0100 |
| commit | f9641eac6577fc0e2f98af304d21b67e6c2533c3 (patch) | |
| tree | 9ca8748aee2da7b7fa32b5ab96982e28dabbb8d0 | |
| parent | 9b71a405b0c2120b631a52d9c19797f8a4880ee9 (diff) | |
| download | Vainbot-f9641eac6577fc0e2f98af304d21b67e6c2533c3.tar.gz Vainbot-f9641eac6577fc0e2f98af304d21b67e6c2533c3.zip | |
be more quiet
| -rw-r--r-- | main.py | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -14,7 +14,7 @@ TOKEN = "MjM5NzI3NzQ2Nzk0NzgyNzIw.Cu5BbA.z7bkO3Ncd_L80htVzREHYDsEGNk" VERSION = "v0.1.0" MODMIRROR = "266921381634113537" -MIRROR_IGNORE = ["237194769116168192"] # bot_spam +MIRROR_IGNORE = [] client = pymongo.MongoClient() db = client.vainbot @@ -67,9 +67,8 @@ async def search_teammates(server, channel, who, query, notify=True): "end": end }).inserted_id - await cli.send_message(channel, who.mention + " You have been put into the queue.") + await cli.send_message(channel, "%s You are in queue.") await asyncio.sleep((start-now).total_seconds()) - await cli.send_message(channel, "%s You will be in queue for %s minutes." % (who.mention, int((end-start).total_seconds() // 60))) players = [] query = { "$or": [ @@ -92,14 +91,13 @@ async def search_teammates(server, channel, who, query, notify=True): await cli.send_message(channel, "%s %s want to play" % (who.mention, ", ".join(players))) else: if notify: - await cli.send_message(channel, "%s Nobody wants to play. I'll notify you when somebody can." % (who.mention)) + await cli.send_message(channel, "%s Nobody wants to play. I'll notify you." % (who.mention)) else: await cli.send_message(channel, "%s Nobody wants to play." % (who.mention)) if notify: await asyncio.sleep((end-start).total_seconds()) db.playwithme.remove({"_id": queueid}) - await cli.send_message(channel, "%s You have been removed from the queue." % (who.mention)) @cli.event async def on_message_delete(message): @@ -151,9 +149,9 @@ async def on_message(message): await cli.send_message(message.channel, "Vainglory Discord bot " + VERSION + " written & hosted by shutterfly") if msg.startswith("?help"): - await cli.send_message(message.channel, "Commands: ?help, ?ping, ?about") - await cli.send_message(message.channel, "<play with me when how long] to find teammates.") - await cli.send_message(message.channel, "<don't play with me> to cancel.") + await cli.send_message(message.channel, "Commands: ?play, ?help, ?ping, ?about") + await cli.send_message(message.channel, "'?play' or 'play with me when how long' to find teammates, " + + "'dont play with me' to cancel.") if msg.startswith("play with me") or msg.startswith("who can play") or msg.startswith("?play"): if msg.startswith("play with me") or msg.startswith("?play"): |
