tweak user-facing messages

This commit is contained in:
xenofem 2020-06-26 03:37:20 -04:00
parent f452eebc09
commit 4549d21cd2

View file

@ -85,8 +85,6 @@ async def on_message(message):
if rounds: if rounds:
schedule = schedule[:rounds] schedule = schedule[:rounds]
await message.channel.send('performing {} rounds of pollination'.format(len(schedule)))
pollination_channels = [] pollination_channels = []
channel_names = config['channel_names'].copy() channel_names = config['channel_names'].copy()
exception_count = 0 exception_count = 0
@ -110,8 +108,10 @@ async def on_message(message):
return return
continue 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: 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)) 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 message.channel.send(announcement)
await asyncio.sleep(30) await asyncio.sleep(30)
@ -119,24 +119,24 @@ async def on_message(message):
try: try:
await a.move_to(c) await a.move_to(c)
except e: except e:
await message.channel.send('failed to move participant: {}'.format(e)) print('failed to move participant {}: {}'.format(a, e), file=sys.stderr)
try: try:
await b.move_to(c) await b.move_to(c)
except e: 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 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 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 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) await asyncio.sleep(30)
for u in participants: for u in participants:
try: try:
await u.move_to(main_voice_channel) await u.move_to(main_voice_channel)
except e: 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) await delete_if_possible(pollination_channels)