Exemplo n.º 1
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.");
        }
Exemplo n.º 2
0
            private async Task Prepare()
            {
                await _localization.Load(await _language.GetLanguage(Context.Guild.Id));

                _settings = await _welcome.Load(Context.Guild.Id);
            }