Explorar o código

Trimming and splitting commands by whitespaces

Lucas Villeneuve %!s(int64=5) %!d(string=hai) anos
pai
achega
9f3a477ddc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      myanimebot/discord.py

+ 1 - 1
myanimebot/discord.py

@@ -41,7 +41,7 @@ class MyAnimeBot(discord.Client):
     async def on_message(self, message):
         if message.author == globals.client.user: return
 
-        words = message.content.split(" ")
+        words = message.content.strip().split()
         channel = message.channel
         author = str('{0.author.mention}'.format(message))