コード例 #1
0
ファイル: AudioModule.cs プロジェクト: NeKzor/Discord.Addons
 protected AudioModule(AudioService service)
 {
     _service = service;
 }
コード例 #2
0
        protected async Task <bool> CheckAllowCommandsAsync(AudioService service, ICommandContext context)
        {
            var guildConfig = await service.Config.GetConfigForGuildAsync(context.Guild);

            return(guildConfig?.AllowCommands ?? service.Config.AllowReactions);
        }
コード例 #3
0
        protected bool CheckAllowCommands(AudioService service, ICommandContext context)
        {
            var guildConfig = service.Config.GuildConfigs.GetValueOrDefault(context.Guild.Id);

            return(guildConfig?.AllowCommands ?? service.Config.AllowReactions);
        }