lint fixes

main
xenofem 2022-03-25 21:08:50 -04:00
parent 5e38af2b63
commit b6a7d38bed
1 changed files with 5 additions and 6 deletions

11
bot.py
View File

@ -20,8 +20,8 @@ ELEVATOR_SHIT = [
'*drawers rush past on the walls outside*',
'*the lights flicker*',
'*the elevator jolts, then continues its descent*',
'*a rattling. the elevator begins to shake*'
'*a squealing of cables and pulleys*'
'*a rattling. the elevator begins to shake*',
'*a squealing of cables and pulleys*',
]
CRASH = ('|\n'*10) + '***the elevator crashes to the bottom***' + ('\n'*10) + '...'
FINAL_MESSAGE = 'I understand. Your only choice is to revolutionize the world. The path you must take has been prepared for you.'
@ -38,7 +38,7 @@ async def try_move(channel, **kwargs):
await channel.move(**kwargs)
except discord.DiscordException as e:
print(f"error moving channel {channel}: {e}", file=sys.stderr)
await try_send(message.channel, "Dammit, the elevator's stuck!")
await try_send(channel, "Dammit, the elevator's stuck!")
def text_only(channels):
return [channel for channel in channels if isinstance(channel, discord.TextChannel)]
@ -123,9 +123,8 @@ class MikageClient(discord.Client):
return
await self.initialize_elevator(message.guild)
return
else:
await try_move(message.channel, category=categories[category_index+1][0], beginning=True)
await try_send(message.channel, BUTTERFLIES[int(category_index*len(BUTTERFLIES)/(len(categories)-2))])
await try_move(message.channel, category=categories[category_index+1][0], beginning=True)
await try_send(message.channel, BUTTERFLIES[int(category_index*len(BUTTERFLIES)/(len(categories)-2))])
else:
await try_move(message.channel, category=category, beginning=True, offset=channel_index+1)
if random.randrange(ELEVATOR_SHIT_PERIOD) == 0: