mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Convert event destructuring
This commit is contained in:
parent
5a52abed77
commit
227d68a2a4
3 changed files with 25 additions and 30 deletions
|
|
@ -2,16 +2,12 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using DSharpPlus;
|
||||
using DSharpPlus.Entities;
|
||||
using DSharpPlus.EventArgs;
|
||||
|
||||
using Myriad.Builders;
|
||||
using Myriad.Extensions;
|
||||
using Myriad.Gateway;
|
||||
using Myriad.Rest;
|
||||
using Myriad.Rest.Types;
|
||||
using Myriad.Types;
|
||||
|
|
@ -20,8 +16,6 @@ using NodaTime;
|
|||
|
||||
using PluralKit.Core;
|
||||
|
||||
using Permissions = DSharpPlus.Permissions;
|
||||
|
||||
namespace PluralKit.Bot
|
||||
{
|
||||
public static class DiscordUtils
|
||||
|
|
@ -190,7 +184,7 @@ namespace PluralKit.Bot
|
|||
return $"<{match.Value}>";
|
||||
});
|
||||
|
||||
public static string EventType(this DiscordEventArgs evt) =>
|
||||
evt.GetType().Name.Replace("EventArgs", "");
|
||||
public static string EventType(this IGatewayEvent evt) =>
|
||||
evt.GetType().Name.Replace("Event", "");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue