Class GeneralModule
- Namespace
- FishMMO.DiscordBot.Modules
- Assembly
- FishMMO-DiscordBot.dll
General-purpose utility commands available to all users.
[Group("general")]
public class GeneralModule : ModuleBase<SocketCommandContext>, IModuleBase
- Inheritance
-
ModuleBase<SocketCommandContext>GeneralModule
- 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
GeneralModule(CommandService, DynamicChannelManagerService, BotConfigurationService)
Initializes a new instance of the GeneralModule class.
public GeneralModule(CommandService commandService, DynamicChannelManagerService dynamicChannelManager, BotConfigurationService botConfigService)
Parameters
commandServiceCommandServicedynamicChannelManagerDynamicChannelManagerServicebotConfigServiceBotConfigurationService
Methods
EchoAsync(string)
Echoes the provided text back to the channel with mentions suppressed.
[Command("echo")]
[Summary("Echoes the provided text.")]
public Task EchoAsync(string text)
Parameters
textstringThe text to echo.
Returns
HelpAsync()
Lists all available commands with their summaries.
[Command("help")]
[Summary("Lists all available commands.")]
public Task HelpAsync()
Returns
ListMutesAsync()
Lists all muted zone channels for the calling user.
[Command("my-mutes")]
[Summary("Lists your muted game chat zone channels.")]
public Task ListMutesAsync()
Returns
MuteZoneAsync()
Mutes a game chat zone channel so the user no longer sees messages from it. Uses Discord permission overwrites to hide the channel from the user.
[Command("mute-zone")]
[Summary("Hides a game chat zone channel from your view. Run in the channel you want to mute.")]
public Task MuteZoneAsync()
Returns
PingAsync()
Responds with Pong to verify the bot is alive.
[Command("ping")]
[Summary("Responds with 'Pong!' and the current gateway latency.")]
public Task PingAsync()
Returns
StatusAsync()
Displays bot uptime, latency, and connected guild count.
[Command("status")]
[Summary("Displays bot uptime, latency, and connected guild count.")]
public Task StatusAsync()
Returns
UnmuteZoneAsync(ulong)
Unmutes a previously muted game chat zone channel.
[Command("unmute-zone")]
[Summary("Unhides a previously muted zone channel. Usage: /general unmute-zone [channel-mention or ID]")]
public Task UnmuteZoneAsync(ulong channelId)
Parameters
channelIdulong