mirror of
https://github.com/TheRealOwenRees/plantid-discord-bot.git
synced 2026-07-23 04:26:57 +00:00
consumes attachments for ID
This commit is contained in:
@@ -26,4 +26,12 @@ defmodule PlantIdDiscordBot.Consumer do
|
||||
"id" -> Cog.PlantNet.id(interaction)
|
||||
end
|
||||
end
|
||||
|
||||
def handle_event({:MESSAGE_CREATE, %{attachments: attachments} = message, _ws_state}) do
|
||||
if length(attachments) > 0 do
|
||||
# deprecated -> Nostrum.Api.Channel.start_typing/1 in v1.0
|
||||
Api.start_typing!(message.channel_id)
|
||||
Cog.PlantNetMessage.id(message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user