@@ -50,7 +50,7 @@ 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 v1.4.0 "
53+ "Bot is now online.\n Version:\t DiscordBot DataBot v2.0.1 "
5454 )
5555
5656 # When a member joins a guild
@@ -61,7 +61,8 @@ async def on_member_join(self, member):
6161
6262 Creates a welcome message in the log channel
6363 """
64- channel = self .bot .get_channel (int (self .jh .getFromConfig ("logchannel" )))
64+ channel = self .bot .get_channel (
65+ int (self .jh .getFromConfig ("logchannel" )))
6566 guild = self .bot .get_guild (int (self .jh .getFromConfig ("guild" )))
6667 await channel .send (f"Hey **{ member .mention } **, welcome to { guild } " )
6768
@@ -80,7 +81,8 @@ async def on_member_remove(self, member):
8081
8182 Sends a goodbye message in the log channel
8283 """
83- channel = self .bot .get_channel (int (self .jh .getFromConfig ("logchannel" )))
84+ channel = self .bot .get_channel (
85+ int (self .jh .getFromConfig ("logchannel" )))
8486 guild = self .bot .get_guild (int (self .jh .getFromConfig ("guild" )))
8587 await channel .send (
8688 f"**{ member .name } ** has left { guild } . Press F to pay respect."
@@ -208,7 +210,8 @@ async def on_raw_reaction_add(self, payload):
208210 not (message .author .bot or payload .member .bot )
209211 and self .jh .getFromConfig ("log" ) == "True"
210212 ):
211- self .jh .addReactionXP (payload .user_id , self .xpf .randomRange (1 , 5 ))
213+ self .jh .addReactionXP (
214+ payload .user_id , self .xpf .randomRange (1 , 5 ))
212215 self .jh .saveData ()
213216
214217 # When a user changes his voice state
@@ -244,7 +247,10 @@ async def on_voice_state_update(self, member, before, after):
244247 and before .channel .name [- 1 ].isdigit ()
245248 ):
246249 # Member left first channel
247- if before .channel .name [- 1 ] == "1" and not before .channel .name [- 2 ].isdigit ():
250+ if (
251+ before .channel .name [- 1 ] == "1"
252+ and not before .channel .name [- 2 ].isdigit ()
253+ ):
248254 # Delete last channel, which has no user in it
249255
250256 channelWithoutNumber = before .channel .name [:- 1 ]
@@ -296,7 +302,8 @@ async def on_voice_state_update(self, member, before, after):
296302 # in it
297303 if afterNumber and len (
298304 find (
299- lambda c : c .name == (channelWithoutNumber + "1" ), allChannel
305+ lambda c : c .name == (
306+ channelWithoutNumber + "1" ), allChannel
300307 ).members
301308 ):
302309 # Get channels with after.channel.name without numbers in it and end
@@ -356,9 +363,9 @@ async def on_message(self, message):
356363 a = "" + message .content
357364
358365 # Stops user from writting in levelchannel none command messages
359- if str (message .channel .id ) == str (self . jh . getFromConfig ( "levelchannel" )) and a [
360- 0
361- ] != self .jh .getFromConfig ("command_prefix" ):
366+ if str (message .channel .id ) == str (
367+ self . jh . getFromConfig ( "levelchannel" )
368+ ) and a [ 0 ] != self .jh .getFromConfig ("command_prefix" ):
362369 await message .delete ()
363370 return
364371
0 commit comments