mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
change: .greet / .bye will get properly disabled if the bot can't write to the specified channel
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
|
||||
|
||||
## [5.0.6]
|
||||
|
||||
### Changed
|
||||
|
||||
- `.greet` and `.bye` will now be automatically disabled if the bot losses permissions to post in the specified channel
|
||||
|
||||
## [5.0.5] - 11.05.2024
|
||||
|
||||
### Fixed
|
||||
|
@@ -222,6 +222,7 @@ public class GreetService : INService, IReadyExecutor
|
||||
toDelete.DeleteAfter(conf.AutoDeleteByeMessagesTimer);
|
||||
}
|
||||
catch (HttpException ex) when (ex.DiscordCode == DiscordErrorCode.InsufficientPermissions
|
||||
|| ex.DiscordCode == DiscordErrorCode.MissingPermissions
|
||||
|| ex.DiscordCode == DiscordErrorCode.UnknownChannel)
|
||||
{
|
||||
Log.Warning(ex,
|
||||
@@ -263,6 +264,7 @@ public class GreetService : INService, IReadyExecutor
|
||||
toDelete.DeleteAfter(conf.AutoDeleteGreetMessagesTimer);
|
||||
}
|
||||
catch (HttpException ex) when (ex.DiscordCode == DiscordErrorCode.InsufficientPermissions
|
||||
|| ex.DiscordCode == DiscordErrorCode.MissingPermissions
|
||||
|| ex.DiscordCode == DiscordErrorCode.UnknownChannel)
|
||||
{
|
||||
Log.Warning(ex,
|
||||
|
Reference in New Issue
Block a user