@@ -50,13 +50,23 @@ async def on_ready(self):
5050 # Sends message to mods, when bot is online
5151 print ("Now Online" )
5252 await self .utils .sendModsMessage (
53- "Bot is now online.\n Version:\t DiscordBot DataBot v2.3.1 "
53+ "Bot is now online.\n Version:\t DiscordBot DataBot v2.4.0 "
5454 )
5555 # Sets the bot's presence to "Online" or "Do not Disturb" to indicate if it's logging or not.
5656 if self .ch .getFromConfig ("log" ) == "True" :
57- await self .bot .change_presence (status = discord .Status .online , activity = discord .Game (str (self .ch .getFromConfig ("command_prefix" )) + "help" ))
58- else :
59- await self .bot .change_presence (status = discord .Status .dnd , activity = discord .Game (str (self .ch .getFromConfig ("command_prefix" )) + "help" ))
57+ await self .bot .change_presence (
58+ status = discord .Status .online ,
59+ activity = discord .Game (
60+ str (self .ch .getFromConfig ("command_prefix" )) + "help"
61+ ),
62+ )
63+ else :
64+ await self .bot .change_presence (
65+ status = discord .Status .dnd ,
66+ activity = discord .Game (
67+ str (self .ch .getFromConfig ("command_prefix" )) + "help"
68+ ),
69+ )
6070
6171 # When a member joins a guild
6272 @commands .Cog .listener ()
@@ -263,7 +273,7 @@ async def on_voice_state_update(self, member, before, after):
263273 if notFirstVoiceChannel :
264274 lastChannel = max (
265275 notFirstVoiceChannel ,
266- key = lambda c : int (c .name [len (channelWithoutNumber ):]),
276+ key = lambda c : int (c .name [len (channelWithoutNumber ) :]),
267277 )
268278
269279 # Removes channel from blacklist if necessary
@@ -310,11 +320,11 @@ async def on_voice_state_update(self, member, before, after):
310320 channel
311321 for channel in allChannel
312322 if after .channel .name [:nameIndex ] in channel .name
313- and channel .name [len (channelWithoutNumber ):].isdigit ()
323+ and channel .name [len (channelWithoutNumber ) :].isdigit ()
314324 ]
315325 # Get all numbers in the end of voiceChannelsWithName
316326 numbersOfChannels = [
317- int (channel .name [len (channelWithoutNumber ):])
327+ int (channel .name [len (channelWithoutNumber ) :])
318328 for channel in voiceChanelsWithName
319329 ]
320330 lowestFreeID = min (
@@ -326,7 +336,7 @@ async def on_voice_state_update(self, member, before, after):
326336 )
327337
328338 channelWithNumberBefore = find (
329- lambda c : c .name [- len (str (lowestFreeID - 1 )):]
339+ lambda c : c .name [- len (str (lowestFreeID - 1 )) :]
330340 == str (lowestFreeID - 1 ),
331341 voiceChanelsWithName ,
332342 )
0 commit comments