discord: fixup /tagme command.

Add code left out of 0435967f.
This commit is contained in:
evazion
2022-06-27 03:57:09 -05:00
parent 6a08c57cec
commit ab7462a42d

View File

@@ -101,10 +101,10 @@ class DiscordSlashCommand
def create_deferred_followup(&block) def create_deferred_followup(&block)
Thread.new do Thread.new do
content = block.call params = block.call
create_followup_message(content) create_followup_message(**params)
rescue StandardError => e rescue StandardError => e
create_followup_message("`Error: #{e.message}`") create_followup_message(content: "`Error: #{e.message}`")
end end
end end
@@ -116,8 +116,8 @@ class DiscordSlashCommand
discord.trigger_typing_indicator(data[:channel_id]) discord.trigger_typing_indicator(data[:channel_id])
end end
def create_followup_message(content) def create_followup_message(**options)
discord.create_followup_message(data[:token], content: content) discord.create_followup_message(data[:token], **options)
end end
def channel def channel