public async Task EnableBattlefieldUpdatesAsync(CommandContext ctx, [Description("The channel where the Battlefield updates should be posted. Defaults to current")] DiscordChannel channel = null) { channel ??= ctx.Channel; await _bfService.EnableForGuildAsync(ctx.Guild.Id, channel.Id); await ctx.OkAsync($"Battlefield Updates enabled in {channel.Name}"); }
public async Task EnableBattlefieldUpdatesAsync(ITextChannel channel) { if (channel == null) { _ = await ReplyAsync("Please provide a valid channel").ConfigureAwait(false); return; } await bfService.EnableForGuildAsync(Context.Guild.Id, channel.Id).ConfigureAwait(false); await ReplyAndDeleteAsync("Battlefield Updates enabled!").ConfigureAwait(false); }