Method RegisterGuildCommands
- Namespace
- DisCatSharp.ApplicationCommands
- Assembly
- DisCatSharp.ApplicationCommands.dll
RegisterGuildCommands<T>(IReadOnlyDictionary<int, ApplicationCommandsExtension>, ulong, Action<ApplicationCommandsTranslationContext>?)
Registers a command class with optional translation setup for a guild.
public static void RegisterGuildCommands<T>(this IReadOnlyDictionary<int, ApplicationCommandsExtension> extensions, ulong guildId, Action<ApplicationCommandsTranslationContext>? translationSetup = null) where T : ApplicationCommandsModule
Parameters
extensionsIReadOnlyDictionary<int, ApplicationCommandsExtension>Sharding extensions.
guildIdulongThe guild id to register it on.
translationSetupAction<ApplicationCommandsTranslationContext>A callback to setup translations with.
Type Parameters
TThe command class to register.
RegisterGuildCommands(IReadOnlyDictionary<int, ApplicationCommandsExtension>, Type, ulong, Action<ApplicationCommandsTranslationContext>)
Registers a command class with optional translation setup for a guild.
public static void RegisterGuildCommands(this IReadOnlyDictionary<int, ApplicationCommandsExtension> extensions, Type type, ulong guildId, Action<ApplicationCommandsTranslationContext> translationSetup = null)
Parameters
extensionsIReadOnlyDictionary<int, ApplicationCommandsExtension>Sharding extensions.
typeTypeThe Type of the command class to register.
guildIdulongThe guild id to register it on.
translationSetupAction<ApplicationCommandsTranslationContext>A callback to setup translations with.