From ab7462a42d04b559d1493266ee57e3ec9ca5fed4 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 27 Jun 2022 03:57:09 -0500 Subject: [PATCH] discord: fixup /tagme command. Add code left out of 0435967f. --- app/logical/discord_slash_command.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/logical/discord_slash_command.rb b/app/logical/discord_slash_command.rb index 2a0cc24df..9a5345d87 100644 --- a/app/logical/discord_slash_command.rb +++ b/app/logical/discord_slash_command.rb @@ -101,10 +101,10 @@ class DiscordSlashCommand def create_deferred_followup(&block) Thread.new do - content = block.call - create_followup_message(content) + params = block.call + create_followup_message(**params) rescue StandardError => e - create_followup_message("`Error: #{e.message}`") + create_followup_message(content: "`Error: #{e.message}`") end end @@ -116,8 +116,8 @@ class DiscordSlashCommand discord.trigger_typing_indicator(data[:channel_id]) end - def create_followup_message(content) - discord.create_followup_message(data[:token], content: content) + def create_followup_message(**options) + discord.create_followup_message(data[:token], **options) end def channel