Compare commits
3 commits
f7108de78e
...
be80687e78
Author | SHA1 | Date | |
---|---|---|---|
be80687e78 | |||
fa010d901c | |||
c78f2bc4a7 |
1 changed files with 11 additions and 3 deletions
14
main.py
14
main.py
|
@ -253,9 +253,10 @@ async def gif_command_handler(message: discord.Message, command: list[str]):
|
||||||
|
|
||||||
target = message.author.name
|
target = message.author.name
|
||||||
sender = message.author.name
|
sender = message.author.name
|
||||||
|
|
||||||
if len(message.mentions) > 0:
|
if len(message.mentions) > 0:
|
||||||
target = message.mentions[0].name
|
target = message.mentions[0].name
|
||||||
|
|
||||||
if command_typed == "help":
|
if command_typed == "help":
|
||||||
await message.reply(HELP_MESSAGE)
|
await message.reply(HELP_MESSAGE)
|
||||||
return
|
return
|
||||||
|
@ -290,10 +291,17 @@ async def on_message(message: discord.Message):
|
||||||
if message.author.bot == True:
|
if message.author.bot == True:
|
||||||
return
|
return
|
||||||
|
|
||||||
# TODO: Do proper parsing of the message
|
# Should prevent the bot from being accidentally triggered from now on. Also will make
|
||||||
message_as_command = message.content.split(" ")
|
# the people here have to say nya more often which is always a bonus.
|
||||||
|
if message.content.startswith('nya') == False:
|
||||||
|
return
|
||||||
|
|
||||||
|
# TODO: Do proper parsing of the message
|
||||||
|
message_as_command = message.content.split("nya ")
|
||||||
|
message_as_command = message_as_command[1].split(" ")
|
||||||
|
|
||||||
command = message_as_command[0]
|
command = message_as_command[0]
|
||||||
|
|
||||||
if command in GIF_COMMANDS:
|
if command in GIF_COMMANDS:
|
||||||
await gif_command_handler(message, message_as_command)
|
await gif_command_handler(message, message_as_command)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue