-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
When purging messages older than 2 weeks, the following exception would be thrown:
System.ArgumentOutOfRangeException: Messages must be younger than two weeks old. (Parameter 'MessageIds')
at Discord.Preconditions.YoungerThanTwoWeeks(UInt64[] collection, String name)
at Discord.API.DiscordRestApiClient.DeleteMessagesAsync(UInt64 channelId, DeleteMessagesParams args, RequestOptions options)
at Discord.Rest.ChannelHelper.DeleteMessagesAsync(ITextChannel channel, BaseDiscordClient client, IEnumerable`1 messageIds, RequestOptions options)
at XeniaBot.Core.Modules.ModerationModule.PurgeMessages(Int32 count, IChannel channel) in /src/XeniaBot.Core/Modules/ModerationModule.cs:line 335
| await targetChannel.DeleteMessagesAsync(messageList); |
This should be fixed so mods can use the /purge command. But this needs to be done once BanSync PostgreSQL data migration has been deployed & ran.
https://docs.discord.com/developers/resources/message#bulk-delete-messages
Might need to implement a queue for this operation in a channel, since only 5 messages per second can be deleted.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels