From f9641eac6577fc0e2f98af304d21b67e6c2533c3 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 1 Feb 2017 19:53:51 +0100 Subject: be more quiet --- main.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 68d0f1a..1b305ad 100644 --- a/main.py +++ b/main.py @@ -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, " 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"): -- cgit v1.3.1