From: Daniel Karbach Date: Wed, 27 Apr 2022 13:41:21 +0000 (+0200) Subject: remove discord bot auto response X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=3caf693c776de3293ec3cb86e19ddebdf9891368;p=alttp.git remove discord bot auto response --- diff --git a/app/Console/Commands/DiscordBotCommand.php b/app/Console/Commands/DiscordBotCommand.php index 4ffbe11..066f5ff 100644 --- a/app/Console/Commands/DiscordBotCommand.php +++ b/app/Console/Commands/DiscordBotCommand.php @@ -101,25 +101,6 @@ class DiscordBotCommand extends Command $this->error('guild role delete: '.$e->getMessage()); } }); - $discord->on('ready', function (Discord $discord) { - $discord->on(Event::MESSAGE_CREATE, function (Message $message, Discord $discord) { - if (!empty($message->guild_id)) return; - if (!empty($message->webhook_id)) return; - if (!empty($message->application_id)) return; - if (is_null($message->author)) return; - if ($message->author->bot) return; - $discord->getLoop()->addTimer(0.6, function() use ($message) { - $message->react('😄'); - }); - if (!is_null($message->channel)) { - $discord->getLoop()->addTimer(2.0, function() use ($message) { - $message->channel->sendMessage('bugger off'); - }); - } else { - $message->delayedReply('bugger off', 2000); - } - }); - }); $discord->getLoop()->addSignal(SIGINT, function() use ($discord) { $discord->close(); });