Class LinkModule
- Namespace
- FishMMO.DiscordBot.Modules
- Assembly
- FishMMO-DiscordBot.dll
Commands for linking a Discord account to a game character. The flow: user runs /link [character], gets a code, types it in-game, the bot detects the code in chat polling and confirms the link.
public class LinkModule : ModuleBase<SocketCommandContext>, IModuleBase
- Inheritance
-
ModuleBase<SocketCommandContext>LinkModule
- Implements
-
IModuleBase
- Inherited Members
-
ModuleBase<SocketCommandContext>.BeforeExecuteAsync(CommandInfo)ModuleBase<SocketCommandContext>.BeforeExecute(CommandInfo)ModuleBase<SocketCommandContext>.AfterExecuteAsync(CommandInfo)ModuleBase<SocketCommandContext>.AfterExecute(CommandInfo)ModuleBase<SocketCommandContext>.OnModuleBuilding(CommandService, ModuleBuilder)ModuleBase<SocketCommandContext>.Context
Constructors
LinkModule(IServiceProvider, AccountLinkingService, BotConfigurationService, ILogger<LinkModule>)
public LinkModule(IServiceProvider serviceProvider, AccountLinkingService accountLinkingService, BotConfigurationService botConfigService, ILogger<LinkModule> logger)
Parameters
serviceProviderIServiceProvideraccountLinkingServiceAccountLinkingServicebotConfigServiceBotConfigurationServiceloggerILogger<LinkModule>
Methods
LinkAsync(string)
Starts the account linking process. The user provides their character name and receives a verification code to type in-game chat.
[Command("link")]
[Summary("Links your Discord account to a game character. Usage: /link [character_name]")]
public Task LinkAsync(string characterName)
Parameters
characterNamestring
Returns
UnlinkAsync()
Removes the link between the user's Discord account and their game account.
[Command("unlink")]
[Summary("Removes the link between your Discord and game accounts.")]
public Task UnlinkAsync()