From 04eb1ab6316aba62b5cbf6f9b729782df1fe5015 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Fri, 29 Apr 2022 14:50:16 +0200 Subject: [PATCH] set discord bot status --- app/Console/Commands/DiscordBotCommand.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Console/Commands/DiscordBotCommand.php b/app/Console/Commands/DiscordBotCommand.php index 066f5ff..c0a92b8 100644 --- a/app/Console/Commands/DiscordBotCommand.php +++ b/app/Console/Commands/DiscordBotCommand.php @@ -10,6 +10,7 @@ use Discord\Parts\Channel\Channel; use Discord\Parts\Channel\Message; use Discord\Parts\Guild\Guild; use Discord\Parts\Guild\Role; +use Discord\Parts\User\Activity; use Discord\WebSockets\Event; use Illuminate\Console\Command; use Monolog\Handler\StreamHandler; @@ -45,6 +46,13 @@ class DiscordBotCommand extends Command 'logger' => $logger, 'token' => config('discord.token'), ]); + $discord->on('ready', function (Discord $discord) { + $activity = new Activity($discord); + $activity->type = Activity::TYPE_LISTENING; + $activity->name = 'HolySmoke'; + $activity->url = 'https://alttp.localhorst.tv/'; + $discord->updatePresence($activity); + }); $discord->on(Event::GUILD_CREATE, function (Guild $guild, Discord $discord) { try { DiscordGuild::onUpstreamCreate($guild); -- 2.39.2