public static void Execute([NotNull] this Command command, [NotNull] ITwitchMessage message, bool emojiOverride = false) { if (command.requiresAdmin && !message.HasBadges("broadcaster")) { return; } if (command.requiresMod && !message.HasBadges("broadcaster", "moderator", "global_mod", "staff")) { return; } CommandItem item = Data.Commands.Find(c => string.Equals(c.DefName, command.defName)); if (item != null && UsageService.IsOnCooldown(item, message.Username)) { return; } if (emojiOverride) { bool emojis = TkSettings.Emojis; TkSettings.Emojis = false; ExecuteInternal(command, message); TkSettings.Emojis = emojis; } else { ExecuteInternal(command, message); } if (item != null) { UsageService.RecordUsage(item, message.Username); } }