public async Task SetRimboardEmote(CommandContext ctx, DiscordEmoji emote) { if (await Permissions.HandlePermissionsCheck(ctx)) { Program.UpdateSettings(ref Program.Settings.RimboardEmoticon, new EmojiData(emote)); await GenericResponses.SendMessageSettingChanged( channel : ctx.Channel, mention : ctx.Member.Mention, title : @"Rimboard emoji changed", valueName : @"Rimboard emoji", newVal : emote.ToString()); } }
public async Task SetRimboardWebhook(CommandContext ctx, ulong id) { if (await Permissions.HandlePermissionsCheck(ctx)) { Program.UpdateSettings(ref Program.Settings.RimboardWebhookId, id); await GenericResponses.SendMessageSettingChanged( channel : ctx.Channel, mention : ctx.Member.Mention, title : @"Rimboard webhook id changed", valueName : @"Rimboard webhook id", newVal : id.ToString()); } }
public async Task SetRimboardChannel(CommandContext ctx, DiscordChannel channel) { if (await Permissions.HandlePermissionsCheck(ctx)) { Program.UpdateSettings(ref Program.Settings.RimboardChannelId, channel.Id); await GenericResponses.SendMessageSettingChanged( channel : ctx.Channel, mention : ctx.Member.Mention, title : @"Rimboard channel changed", valueName : @"Rimboard channel", newVal : channel.Mention); } }
public async Task FunAllowed(CommandContext ctx, bool enabled) { if (await Permissions.HandlePermissionsCheck(ctx)) { Program.UpdateSettings(ref Program.Settings.FunAllowed, enabled); string a = GetEnabledDisabled(enabled); await GenericResponses.SendMessageSettingChanged( channel : ctx.Channel, mention : ctx.Member.Mention, title : $"Fun {a}", valueName : @"fun allowed", newVal : a); } }
public async Task SetRimboardReactionsRequiredToPin(CommandContext ctx, uint count) { if (await Permissions.HandlePermissionsCheck(ctx)) { // Clamp it to the max value first so the bot doesn't crash. int countInt = (int)Math.Min(count, int.MaxValue); Program.UpdateSettings(ref Program.Settings.RimboardPinReactionsNeeded, countInt); await GenericResponses.SendMessageSettingChanged( channel : ctx.Channel, mention : ctx.Member.Mention, title : @"Rimboard reactions to pin message required changed", valueName : @"Rimboard reaction to pin requirement", newVal : count.ToString()); } }
public async Task SetMaxWarnLimit(CommandContext ctx, uint months) { if (await Permissions.HandlePermissionsCheck(ctx)) { // Clamp it to the max value first so the bot doesn't crash. int monthsInt = (int)Math.Min(months, int.MaxValue); Program.UpdateSettings(ref Program.Settings.MaxActionAgeMonths, monthsInt); await GenericResponses.SendMessageSettingChanged( channel : ctx.Channel, mention : ctx.Member.Mention, title : @"Warning threshold changed", valueName : @"warn month limit", newVal : monthsInt.ToString()); } }