feat(bot): remove hacky fix for extremely slow system deletes

they are no longer extremely slow
This commit is contained in:
spiral
2022-06-15 18:52:50 -04:00
parent ba9c074dc2
commit 7cb3a3ea0f
4 changed files with 0 additions and 17 deletions

View File

@@ -117,17 +117,6 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
if (!HasCommandPrefix(content, ourUserId, out var cmdStart) || cmdStart == content.Length)
return false;
if (ctx.IsDeleting)
{
await _rest.CreateMessage(evt.ChannelId, new()
{
Content = $"{Emojis.Error} Your system is currently being deleted."
+ " Due to database issues, it is not possible to use commands while a system is being deleted. Please wait a few minutes and try again.",
MessageReference = new(guild?.Id, channel.Id, evt.Id)
});
return true;
}
// Trim leading whitespace from command without actually modifying the string
// This just moves the argPos pointer by however much whitespace is at the start of the post-argPos string
var trimStartLengthDiff =
@@ -172,8 +161,6 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
private async ValueTask<bool> TryHandleProxy(MessageCreateEvent evt, Guild guild, Channel channel,
MessageContext ctx)
{
if (ctx.IsDeleting) return false;
var botPermissions = await _cache.PermissionsIn(channel.Id);
try