]> git.localhorst.tv Git - alttp.git/commitdiff
remove discord bot auto response
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 27 Apr 2022 13:41:21 +0000 (15:41 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 27 Apr 2022 13:41:21 +0000 (15:41 +0200)
app/Console/Commands/DiscordBotCommand.php

index 4ffbe119f440dbf5d308d05283025cb9557bec57..066f5ff51920027f5b0f72b1bb609532d5bb484e 100644 (file)
@@ -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();
                });