Exemple #1
0
            public async Task WelcomeImageEnable()
            {
                _settings.UseImage = true;
                await _welcome.Save(_settings);

                await ReplyAsync(_localization.GetMessage("Welcome image enable", Context.Guild.Name));
            }
Exemple #2
0
            public async Task WelcomeMessageSet([Remainder] string message)
            {
                _settings.Message = message;
                try
                {
                    await _welcome.Save(_settings);
                }
                catch (InvalidMessageException)
                {
                    await ReplyAsync(_localization.GetMessage("Welcome message invalid"));

                    return;
                }

                await ReplyAsync(_localization.GetMessage("Welcome message set", message, Context.Guild.Name));
            }
Exemple #3
0
        private async Task DisableWelcomeMessage(SocketGuild guild)
        {
            var settings = await _welcome.Load(guild.Id);

            settings.ChannelId = null;
            await _welcome.Save(settings);

            var owner = guild.Owner;
            await owner.SendDM(
                $@"I'm sorry to bother you, but it seems like something went wrong with the welcome message for `{guild.Name}`.
This could have happened due to an accidental deletion and re-creation of the channel.
As a result of this, I had to disable the feature.
You can re-enable it by executing the command `{_command.GetPrefix(guild.Id)}welcome enable <channel>` on your server again.

Sorry for the inconvenience.
If this keeps happening, join my support server 'https://discord.gg/YFqUMDT' to get some help.");
        }