public async Task InvokeAsync(DiscordFacingContext discordFacingContext)
 {
     if (this.Trigger.Valid(discordFacingContext))
     {
         await this.module.InvokeAsync(discordFacingContext);
     }
 }
Ejemplo n.º 2
0
 public async Task InvokeAsync(DiscordFacingContext discordFacingContext)
 {
     if (Trigger.Valid(discordFacingContext))
     {
         await command.InvokeAsync(discordFacingContext);
     }
 }
Ejemplo n.º 3
0
        public bool Valid(DiscordFacingContext context)
        {
            if (context.Message.Content.StartsWith(prefix))
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 4
0
        public async Task InvokeAsync(DiscordFacingContext discordFacingContext)
        {
            if (discordFacingContext.Channel is IGuildChannel guildChannel)
            {
                var settings = await settingsService.GetSettingsByGuild(guildChannel.GuildId);

                if (settings.Enabled)
                {
                    await this.command.InvokeAsync(discordFacingContext);
                }
            }
        }
Ejemplo n.º 5
0
 public Task InvokeAsync(DiscordFacingContext discordFacingContext)
 {
     // TODO Technically this is not a command and therefore this is not needed, therefore refactor IModule
     throw new NotImplementedException();
 }
Ejemplo n.º 6
0
 public async Task InvokeAsync(DiscordFacingContext discordFacingContext)
 {
     // TODO
     await discordFacingContext.Channel.SendMessageAsync("TODO: Provide Help Message").ConfigureAwait(false);
 }
Ejemplo n.º 7
0
 public Task InvokeAsync(DiscordFacingContext discordFacingContext)
 {
     throw new NotImplementedException();
 }