Пример #1
0
        public async Task ToggleWelcome()
        {
            var config = GreetingsService.GetWelcomeConfig(Context.Guild.Id);

            config.Enabled = !config.Enabled;
            GreetingsService.SaveWelcomeConfig(config);
            await ReplyAsync($"Display Welcome Messages: {config.Enabled}\nNOTE: You will need to run the `SetWelcomeChannel` command or enable dms in order for this to work.");
        }
Пример #2
0
        public async Task ToggleWelcomeDms()
        {
            var config = GreetingsService.GetWelcomeConfig(Context.Guild.Id);

            config.DirectMessage = !config.DirectMessage;
            GreetingsService.SaveWelcomeConfig(config);
            await ReplyAsync($"Display Welcome Messages: {config.Enabled}\n" +
                             $"Direct Message Welcomes: {config.DirectMessage}");
        }
Пример #3
0
        public async Task SetWelcomeChannel()
        {
            var config = GreetingsService.GetWelcomeConfig(Context.Guild.Id);

            config.WelcomeChannel = Context.Channel.Id;
            GreetingsService.SaveWelcomeConfig(config);
            await ReplyAsync($"Display Welcome Messages: {config.Enabled}\n" +
                             $"Welcome channel set to: {Context.Channel.Name}");
        }
Пример #4
0
        public async Task SetWelcomeMessage([Remainder] string message = null)
        {
            var config = GreetingsService.GetWelcomeConfig(Context.Guild.Id);

            config.WelcomeMessage = message;
            GreetingsService.SaveWelcomeConfig(config);
            await ReplyAsync($"Display Welcome Messages: {config.Enabled}\n" +
                             $"**Message**\n" +
                             $"{message ?? "DEFAULT"}");
        }