瀏覽代碼

Trimming and splitting commands by whitespaces

Lucas Villeneuve 5 年之前
父節點
當前提交
9f3a477ddc
共有 1 個文件被更改,包括 1 次插入1 次删除
  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))