Class SlashCommandAutoSyncService
Hold all the methods to sync the local slash command to Discords api.
Inheritance
System.Object
SlashCommandAutoSyncService
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Color_Chan.Discord.Commands.Services.Implementations
Assembly: Color-Chan.Discord.Commands.dll
Syntax
public class SlashCommandAutoSyncService : ISlashCommandAutoSyncService
Constructors
| Improve this Doc View SourceSlashCommandAutoSyncService(IDiscordRestApplication, DiscordTokens, ILogger<SlashCommandAutoSyncService>, ISlashCommandBuildService, IOptions<SlashCommandConfiguration>)
Initializes a new instance of IDiscordRestApplication.
Declaration
public SlashCommandAutoSyncService(IDiscordRestApplication restApplication, DiscordTokens discordTokens, ILogger<SlashCommandAutoSyncService> logger, ISlashCommandBuildService commandBuildService, IOptions<SlashCommandConfiguration> slashConfigs)
Parameters
Type | Name | Description |
---|---|---|
IDiscordRestApplication | restApplication | The IDiscordRestApplication that will be used to update and delete slash commands. |
DiscordTokens | discordTokens | The tokens for the application. |
Microsoft.Extensions.Logging.ILogger<SlashCommandAutoSyncService> | logger | The Microsoft.Extensions.Logging.ILogger for SlashCommandAutoSyncService. |
ISlashCommandBuildService | commandBuildService | The ISlashCommandBuildService that will be used to build the slash commands parameters. |
Microsoft.Extensions.Options.IOptions<SlashCommandConfiguration> | slashConfigs | The configurations for the slash commands. |
Methods
| Improve this Doc View SourceUpdateApplicationCommandsAsync(IEnumerable<ISlashCommandInfo>)
Updates the slash commands for the currently signed in application.
Declaration
public async Task<Result> UpdateApplicationCommandsAsync(IEnumerable<ISlashCommandInfo> commandInfos)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ISlashCommandInfo> | commandInfos | The commandInfos that will be used to update slash commands. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Result> | The Result with the results of the update process. |