public SysCord(PokeTradeHub <PK8> hub) { Hub = hub; SysCordInstance.Self = this; // hack SysCordInstance.Manager = new DiscordManager(Hub.Config); AutoLegalityWrapper.EnsureInitialized(Hub.Config.Legality); PriorityUtil.GetInitialCooldowns(); _client = new DiscordSocketClient(new DiscordSocketConfig { // How much logging do you want to see? LogLevel = LogSeverity.Info, // If you or another service needs to do anything with messages // (eg. checking Reactions, checking the content of edited/deleted messages), // you must set the MessageCacheSize. You may adjust the number as needed. //MessageCacheSize = 50, }); _commands = new CommandService(new CommandServiceConfig { // Again, log level: LogLevel = LogSeverity.Info, // There's a few more properties you can set, // for example, case-insensitive commands. CaseSensitiveCommands = false, }); // Subscribe the logging handler to both the client and the CommandService. _client.Log += Log; _commands.Log += Log; // Setup your DI container. _services = ConfigureServices(); }
public async Task CheckCooldownStatus() { PriorityUtil.CheckUserCooldown(Context.User, out var msg); await ReplyAsync(msg).ConfigureAwait(false); }
public async Task ClearAllCooldowns() { PriorityUtil.ClearAllCooldowns(); await ReplyAsync("All cooldowns have been cleared.").ConfigureAwait(false); }