mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Merge branch 'master' into sound-to-loaded
This commit is contained in:
commit
fb5c701808
2 changed files with 8 additions and 1 deletions
|
@ -35,7 +35,7 @@ public class ToolsCommandGroup : CommandGroup
|
|||
public ToolsCommandGroup(
|
||||
ICommandContext context, IFeedbackService feedback,
|
||||
GuildDataService guildData, IDiscordRestGuildAPI guildApi,
|
||||
IDiscordRestUserAPI userApi, IDiscordRestChannelAPI channelApi)
|
||||
IDiscordRestUserAPI userApi)
|
||||
{
|
||||
_context = context;
|
||||
_guildData = guildData;
|
||||
|
|
|
@ -151,6 +151,13 @@ public sealed partial class MemberUpdateService : BackgroundService
|
|||
return Result.FromSuccess();
|
||||
}
|
||||
|
||||
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId, id, ct);
|
||||
if (!existingBanResult.IsDefined())
|
||||
{
|
||||
data.BannedUntil = null;
|
||||
return Result.FromSuccess();
|
||||
}
|
||||
|
||||
var unbanResult = await _guildApi.RemoveGuildBanAsync(
|
||||
guildId, id, Messages.PunishmentExpired.EncodeHeader(), ct);
|
||||
if (unbanResult.IsSuccess)
|
||||
|
|
Loading…
Add table
Reference in a new issue