Table of Contents

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

extensions IReadOnlyDictionary<int, ApplicationCommandsExtension>

Sharding extensions.

guildId ulong

The guild id to register it on.

translationSetup Action<ApplicationCommandsTranslationContext>

A callback to setup translations with.

Type Parameters

T

The 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

extensions IReadOnlyDictionary<int, ApplicationCommandsExtension>

Sharding extensions.

type Type

The Type of the command class to register.

guildId ulong

The guild id to register it on.

translationSetup Action<ApplicationCommandsTranslationContext>

A callback to setup translations with.