Esempio n. 1
0
        public async Task SendModLog(IGuild guild, ModCase modCase)
        {
            //Retrieve guild settings
            var guildSettings = _botContext.Guilds.AsNoTracking().FirstOrDefault(x => x.GuildId == guild.Id);

            if (guildSettings == null)
            {
                return;
            }

            if (guildSettings.ModerationChannel == 0)
            {
                return;
            }

            var moderationChannel = await guild.GetTextChannelAsync(guildSettings.ModerationChannel);

            await moderationChannel.SendMessageAsync(embed : ModerationFormats.ModLogEmbed(modCase));
        }
Esempio n. 2
0
 public static async Task SendModLog(SocketTextChannel moderationChannel, ModCase modCase)
 {
     await moderationChannel.SendMessageAsync(embed : ModerationFormats.ModLogEmbed(modCase));
 }