Method RegisterGuildCommands
- Namespace
- DisCatSharp.ApplicationCommands
- Assembly
- DisCatSharp.ApplicationCommands.dll
RegisterGuildCommands(Assembly, ulong)
Registers all commands from a given assembly. The command classes need to be public to be considered for registration.
public void RegisterGuildCommands(Assembly assembly, ulong guildId)
Parameters
RegisterGuildCommands<T>(ulong, Action<ApplicationCommandsTranslationContext>?)
Registers a command class with optional translation setup for a guild.
public void RegisterGuildCommands<T>(ulong guildId, Action<ApplicationCommandsTranslationContext>? translationSetup = null) where T : ApplicationCommandsModule
Parameters
guildIdulongThe guild id to register it on.
translationSetupAction<ApplicationCommandsTranslationContext>A callback to setup translations with.
Type Parameters
TThe command class to register.
RegisterGuildCommands(Type, ulong, Action<ApplicationCommandsTranslationContext>?)
Registers a command class with optional translation setup for a guild.
public void RegisterGuildCommands(Type type, ulong guildId, Action<ApplicationCommandsTranslationContext>? translationSetup = null)
Parameters
typeTypeThe Type of the command class to register.
guildIdulongThe guild id to register it on.
translationSetupAction<ApplicationCommandsTranslationContext>A callback to setup translations with.