public async Task LFC(CommandContext ctx, DiscordMember username = null) { await ctx.Message.DeleteAsync(); await ctx.TriggerTypingAsync(); string content = CustomMethod.GetCommandOutput(ctx, "lfc2", null, username); DiscordRole pc = ctx.Guild.GetRole(223867454642716673); DiscordRole ps = ctx.Guild.GetRole(223867009484587008); DiscordRole xb = ctx.Guild.GetRole(223867264246611970); bool check = false; if (username == null) { username = ctx.Member; } foreach (var item in username.Roles) { if ((item == pc || item == ps || item == xb) && !check) { content = CustomMethod.GetCommandOutput(ctx, "lfc1", null, username); check = true; } } await new DiscordMessageBuilder() .WithContent(content) .WithAllowedMention(new UserMention()) .SendAsync(ctx.Channel); }
public async Task ProSettings(CommandContext ctx, DiscordMember username = null) { await ctx.Message.DeleteAsync(); await ctx.TriggerTypingAsync(); string content; if (username is null) { content = CustomMethod.GetCommandOutput(ctx, "prosettings", null, ctx.Member); } else { content = CustomMethod.GetCommandOutput(ctx, "prosettings", null, username); } await new DiscordMessageBuilder() .WithContent(content) .WithAllowedMention(new UserMention()) .SendAsync(ctx.Channel); }
public async Task TCE(CommandContext ctx, [Description("Specifies the user the bot will mention, use ID or mention the user. If left blank, it will mention you.")] DiscordMember username = null, [Description("Specifies in what language the bot will respond. example, fr-french")] string language = null) { await ctx.Message.DeleteAsync(); await ctx.TriggerTypingAsync(); string content; if (username is null) { content = CustomMethod.GetCommandOutput(ctx, "tce", language, ctx.Member); } else { content = CustomMethod.GetCommandOutput(ctx, "tce", language, username); } await new DiscordMessageBuilder() .WithContent(content) .WithAllowedMention(new UserMention()) .SendAsync(ctx.Channel); }