From 949c4326988d5e3aabd9930e1aa31e95d630e79f Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 26 Jul 2023 22:32:21 +0100 Subject: [PATCH 1/2] chore: bump to 1.6.2 --- SuggestionBot/SuggestionBot.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SuggestionBot/SuggestionBot.csproj b/SuggestionBot/SuggestionBot.csproj index f62cd57..43f5e2c 100644 --- a/SuggestionBot/SuggestionBot.csproj +++ b/SuggestionBot/SuggestionBot.csproj @@ -6,7 +6,7 @@ enable enable Linux - 1.6.1 + 1.6.2 From 91c807f315432b36a0cb27a9b901c1c3869550e5 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 26 Jul 2023 22:33:30 +0100 Subject: [PATCH 2/2] feat: add status explaining usage --- CHANGELOG.md | 6 ++++++ SuggestionBot/Services/BotService.cs | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7adaa8d..de15f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.2] - 2023-07-26 + +### Added + +- Added status which explains bot usage. + ## [1.6.1] - 2023-07-24 ### Added diff --git a/SuggestionBot/Services/BotService.cs b/SuggestionBot/Services/BotService.cs index c5c7358..2337e06 100644 --- a/SuggestionBot/Services/BotService.cs +++ b/SuggestionBot/Services/BotService.cs @@ -1,5 +1,7 @@ using System.Reflection; using DSharpPlus; +using DSharpPlus.Entities; +using DSharpPlus.EventArgs; using DSharpPlus.SlashCommands; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -66,6 +68,13 @@ protected override Task ExecuteAsync(CancellationToken stoppingToken) slashCommands.RegisterCommands(); slashCommands.RegisterCommands(); + _discordClient.Ready += OnReady; return _discordClient.ConnectAsync(); } + + private Task OnReady(DiscordClient sender, ReadyEventArgs args) + { + var activity = new DiscordActivity("/suggest to make suggestions", ActivityType.Playing); + return _discordClient.UpdateStatusAsync(activity); + } }