From 4549d21cd20a2940ecd27c062ce46a9e31725741 Mon Sep 17 00:00:00 2001 From: xenofem Date: Fri, 26 Jun 2020 03:37:20 -0400 Subject: [PATCH] tweak user-facing messages --- waggle-dance.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/waggle-dance.py b/waggle-dance.py index ce8cf9f..e8247c9 100755 --- a/waggle-dance.py +++ b/waggle-dance.py @@ -85,8 +85,6 @@ async def on_message(message): if rounds: schedule = schedule[:rounds] - await message.channel.send('performing {} rounds of pollination'.format(len(schedule))) - pollination_channels = [] channel_names = config['channel_names'].copy() exception_count = 0 @@ -110,8 +108,10 @@ async def on_message(message): return continue + await message.channel.send("{} Welcome to pollination! You'll be randomly paired up, moved into separate voice channels, spend some time chatting, and then move to a new channel and meet somebody else. Each round will last 5 minutes, and there'll be {} rounds total. I'll announce when your time is nearly up so you can wrap up your conversations, and I'll automatically move you to a different voice channel at the start of each new round. **Feel free to leave at any time if you need to. You won't get moved into new voice channels if you disconnect from voice.** If you find yourself alone in a channel, the person you were paired with for that round may have left; just relax and take a break for 5 minutes. Have fun!".format(mention_all, len(schedule))) + for matching in schedule: - announcement = 'next round starting in 30 seconds:\n' + announcement = 'Next round starting in 30 seconds:\n' announcement += '\n'.join('{0} and {1} in {2}'.format(a.mention, b.mention, c.name) for ((a, b), c) in zip(matching, pollination_channels)) await message.channel.send(announcement) await asyncio.sleep(30) @@ -119,24 +119,24 @@ async def on_message(message): try: await a.move_to(c) except e: - await message.channel.send('failed to move participant: {}'.format(e)) + print('failed to move participant {}: {}'.format(a, e), file=sys.stderr) try: await b.move_to(c) except e: - await message.channel.send('failed to move participant: {}'.format(e)) + print('failed to move participant {}: {}'.format(b, e), file=sys.stderr) await asyncio.sleep(60*3) - await message.channel.send('round ending in 2 minutes {}'.format(mention_all)) + await message.channel.send('Round ending in 2 minutes {}'.format(mention_all)) await asyncio.sleep(60) - await message.channel.send('round ending in 1 minute {}'.format(mention_all)) + await message.channel.send('Round ending in 1 minute {}'.format(mention_all)) await asyncio.sleep(30) - await message.channel.send('returning to main channel in 30 seconds {}'.format(mention_all)) + await message.channel.send('Returning to main channel in 30 seconds {}'.format(mention_all)) await asyncio.sleep(30) for u in participants: try: await u.move_to(main_voice_channel) except e: - await message.channel.send('failed to move participant: {}'.format(e)) + print('failed to move participant {}: {}'.format(u, e), file=sys.stderr) await delete_if_possible(pollination_channels)