lint fixes
This commit is contained in:
parent
5e38af2b63
commit
b6a7d38bed
11
bot.py
11
bot.py
|
@ -20,8 +20,8 @@ ELEVATOR_SHIT = [
|
||||||
'*drawers rush past on the walls outside*',
|
'*drawers rush past on the walls outside*',
|
||||||
'*the lights flicker*',
|
'*the lights flicker*',
|
||||||
'*the elevator jolts, then continues its descent*',
|
'*the elevator jolts, then continues its descent*',
|
||||||
'*a rattling. the elevator begins to shake*'
|
'*a rattling. the elevator begins to shake*',
|
||||||
'*a squealing of cables and pulleys*'
|
'*a squealing of cables and pulleys*',
|
||||||
]
|
]
|
||||||
CRASH = ('|\n'*10) + '***the elevator crashes to the bottom***' + ('\n'*10) + '...'
|
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.'
|
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)
|
await channel.move(**kwargs)
|
||||||
except discord.DiscordException as e:
|
except discord.DiscordException as e:
|
||||||
print(f"error moving channel {channel}: {e}", file=sys.stderr)
|
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):
|
def text_only(channels):
|
||||||
return [channel for channel in channels if isinstance(channel, discord.TextChannel)]
|
return [channel for channel in channels if isinstance(channel, discord.TextChannel)]
|
||||||
|
@ -123,9 +123,8 @@ class MikageClient(discord.Client):
|
||||||
return
|
return
|
||||||
await self.initialize_elevator(message.guild)
|
await self.initialize_elevator(message.guild)
|
||||||
return
|
return
|
||||||
else:
|
await try_move(message.channel, category=categories[category_index+1][0], beginning=True)
|
||||||
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_send(message.channel, BUTTERFLIES[int(category_index*len(BUTTERFLIES)/(len(categories)-2))])
|
|
||||||
else:
|
else:
|
||||||
await try_move(message.channel, category=category, beginning=True, offset=channel_index+1)
|
await try_move(message.channel, category=category, beginning=True, offset=channel_index+1)
|
||||||
if random.randrange(ELEVATOR_SHIT_PERIOD) == 0:
|
if random.randrange(ELEVATOR_SHIT_PERIOD) == 0:
|
||||||
|
|
Loading…
Reference in a new issue