public AutoModInfraction(uint id, ulong userId, AutoModInfractionType type, string trigger = "") { Id = id; InfractionerId = userId; Type = type; Trigger = trigger; Date = DateTime.UtcNow; }
public AutoModInfraction AddAutoModInfractionToGuild(ulong userId, AutoModInfractionType type, string trigger) { var infraction = new AutoModInfraction(++LastUsedAutoModId, userId, type, trigger); AutoModInfractions.Add(infraction); return(infraction); }
private async Task <AutoModInfraction> AddAutoModInfractionToGuild(GuildAccount guild, ulong userId, AutoModInfractionType type, string trigger = "") { var infraction = guild.AddAutoModInfractionToGuild(userId, type, trigger); if (guild.AutoMod.LogChannelId != 0) { var channel = _client.GetChannel(guild.AutoMod.LogChannelId) as ITextChannel; var embed = await GetMessageEmbedForLogAsync(infraction); await channel.SendMessageAsync("", false, embed); } return(infraction); }