mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 13:54:36 +00:00
Use CommandContextType over deprecated EnabledInDm attributes
This commit is contained in:
parent
b3e9241235
commit
d94c98aed2
5 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ using System.Text;
|
|||
|
||||
namespace BirthdayBot.ApplicationCommands;
|
||||
[Group("birthday", HelpCmdBirthday)]
|
||||
[EnabledInDm(false)]
|
||||
[CommandContextType(InteractionContextType.Guild)]
|
||||
public class BirthdayModule : BotModuleBase {
|
||||
public const string HelpCmdBirthday = "Commands relating to birthdays.";
|
||||
public const string HelpCmdSetDate = "Sets or updates your birthday.";
|
||||
|
|
|
@ -5,7 +5,7 @@ using static BirthdayBot.Common;
|
|||
namespace BirthdayBot.ApplicationCommands;
|
||||
[Group("override", HelpCmdOverride)]
|
||||
[DefaultMemberPermissions(GuildPermission.ManageGuild)]
|
||||
[EnabledInDm(false)]
|
||||
[CommandContextType(InteractionContextType.Guild)]
|
||||
public class BirthdayOverrideModule : BotModuleBase {
|
||||
public const string HelpCmdOverride = "Commands to set options for other users.";
|
||||
const string HelpOptOvTarget = "The user whose data to modify.";
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
namespace BirthdayBot.ApplicationCommands;
|
||||
[Group("config", HelpCmdConfig)]
|
||||
[DefaultMemberPermissions(GuildPermission.ManageGuild)]
|
||||
[EnabledInDm(false)]
|
||||
[CommandContextType(InteractionContextType.Guild)]
|
||||
public class ConfigModule : BotModuleBase {
|
||||
public const string HelpCmdConfig = "Configure basic settings for the bot.";
|
||||
public const string HelpCmdAnnounce = "Settings regarding birthday announcements.";
|
||||
|
|
|
@ -7,7 +7,7 @@ public class ExportModule : BotModuleBase {
|
|||
|
||||
[SlashCommand("export-birthdays", HelpCmdExport)]
|
||||
[DefaultMemberPermissions(GuildPermission.ManageGuild)]
|
||||
[EnabledInDm(false)]
|
||||
[CommandContextType(InteractionContextType.Guild)]
|
||||
public async Task CmdExport([Summary(description: "Specify whether to export the list in CSV format.")] bool asCsv = false) {
|
||||
if (!await HasMemberCacheAsync(Context.Guild)) {
|
||||
await RespondAsync(MemberCacheEmptyError, ephemeral: true);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using Discord.Interactions;
|
||||
|
||||
namespace BirthdayBot.ApplicationCommands;
|
||||
[EnabledInDm(true)]
|
||||
[CommandContextType(InteractionContextType.Guild, InteractionContextType.BotDm)]
|
||||
public class HelpModule : BotModuleBase {
|
||||
private const string TopMessage =
|
||||
"Thank you for using Birthday Bot!\n" +
|
||||
|
|
Loading…
Reference in a new issue