public Task Warn( [Summary("The user to which the warning is being issued.")] IGuildUser subject, [Summary("The reason for the warning.")] [Remainder] string reason) => ModerationService.CreateInfractionAsync(InfractionType.Warning, subject.Id, reason, null);
public Task Note( [Summary("The user to which the note is being applied.")] IGuildUser subject, [Summary("The reason for the note.")] [Remainder] string reason) => ModerationService.CreateInfractionAsync(InfractionType.Notice, subject.Id, reason, null);
public Task Mute( [Summary("The user to be muted.")] IGuildUser subject, [Summary("The reason for the mute.")] [Remainder] string reason) => ModerationService.CreateInfractionAsync(InfractionType.Mute, subject.Id, reason, null);
public async Task Forceban( [Summary("The id of the user to be banned.")] ulong subjectId, [Summary("The reason for the ban.")] [Remainder] string reason) { await ModerationService.CreateInfractionAsync(InfractionType.Ban, subjectId, reason, null); await Context.AddConfirmation(); }
public async Task Ban( [Summary("The user to be banned.")] IGuildUser subject, [Summary("The reason for the ban.")] [Remainder] string reason) { var result = await ModerationService.CreateInfractionAsync(InfractionType.Ban, subject.Id, reason, null); await AddConfirmationOrHandleAsync(result); }
public async Task Note( [Summary("The user to which the note is being applied.")] DiscordUserEntity subject, [Summary("The reason for the note.")] [Remainder] string reason) { await ModerationService.CreateInfractionAsync(InfractionType.Notice, subject.Id, reason, null); await Context.AddConfirmation(); }
public async Task Warn( [Summary("The user to which the warning is being issued.")] IGuildUser subject, [Summary("The reason for the warning.")] [Remainder] string reason) { var result = await ModerationService.CreateInfractionAsync(InfractionType.Warning, subject.Id, reason, null); await AddConfirmationOrHandleAsync(result); }
public async Task BanAsync( [Summary("The user to be banned.")] DiscordUserEntity subject, [Summary("The reason for the ban.")] [Remainder] string reason) { await ModerationService.CreateInfractionAsync(Context.Guild.Id, Context.User.Id, InfractionType.Ban, subject.Id, reason, null); await Context.AddConfirmation(); }
public async Task WarnAsync( [Summary("The user to which the warning is being issued.")] DiscordUserEntity subject, [Summary("The reason for the warning.")] [Remainder] string reason) { await ModerationService.CreateInfractionAsync(Context.Guild.Id, Context.User.Id, InfractionType.Warning, subject.Id, reason, null); await Context.AddConfirmation(); }
public async Task Mute( [Summary("The user to be muted.")] DiscordUserEntity subject, [Summary("The reason for the mute.")] [Remainder] string reason) { await ModerationService.CreateInfractionAsync(InfractionType.Mute, subject.Id, reason, null); await Context.AddConfirmation(); }
public async Task MuteAsync( [Summary("The user to be muted.")] DiscordUserEntity subject, [Summary("The reason for the mute.")] [Remainder] string reason) { var reasonWithUrls = AppendUrlsFromMessage(reason); await ModerationService.CreateInfractionAsync(Context.Guild.Id, Context.User.Id, InfractionType.Mute, subject.Id, reasonWithUrls, null); await ConfirmAndReplyWithCountsAsync(subject.Id); }
public async Task WarnAsync( [Summary("The user to which the warning is being issued.")] DiscordUserOrMessageAuthorEntity subject, [Summary("The reason for the warning.")] [Remainder] string reason) { var reasonWithUrls = AppendUrlsFromMessage(reason); await ModerationService.CreateInfractionAsync(Context.Guild.Id, Context.User.Id, InfractionType.Warning, subject.UserId, reasonWithUrls, null); await ConfirmAndReplyWithCountsAsync(subject.UserId); }
public async Task TempMuteAsync( [Summary("The user to be muted.")] DiscordUserEntity subject, [Summary("The duration of the mute.")] TimeSpan duration, [Summary("The reason for the mute.")] [Remainder] string reason) { await ModerationService.CreateInfractionAsync(Context.Guild.Id, Context.User.Id, InfractionType.Mute, subject.Id, reason, duration); await Context.AddConfirmation(); }
public async Task TempMute( [Summary("The user to be muted.")] IGuildUser subject, [Summary("The duration of the mute.")] TimeSpan duration, [Summary("The reason for the mute.")] [Remainder] string reason) { var result = await ModerationService.CreateInfractionAsync(InfractionType.Mute, subject.Id, reason, duration); await AddConfirmationOrHandleAsync(result); }
public async Task NoteAsync( [Summary("The user to which the note is being applied.")] DiscordUserOrMessageAuthorEntity subject, [Summary("The reason for the note.")] [Remainder] string reason) { if (!await GetConfirmationIfRequiredAsync(subject)) { return; } var reasonWithUrls = AppendUrlsFromMessage(reason); await ModerationService.CreateInfractionAsync(Context.Guild.Id, Context.User.Id, InfractionType.Notice, subject.UserId, reasonWithUrls, null); await ConfirmAndReplyWithCountsAsync(subject.UserId); }
public Task TempMute( [Summary("The user to be muted.")] IGuildUser subject, [Summary("The duration of the mute.")] string durationString, [Summary("The reason for the mute.")] [Remainder] string reason) { // TODO: Remove when we port to 2.0 var duration = TimeSpanTypeReader.Read(durationString); if (!duration.HasValue) { throw new ArgumentException("Invalid Timespan Format"); } return(ModerationService.CreateInfractionAsync(InfractionType.Mute, subject.Id, reason, duration.Value)); }
public async Task TempMuteAsync( [Summary("The duration of the mute.")] TimeSpan duration, [Summary("The user to be muted.")] DiscordUserOrMessageAuthorEntity subject, [Summary("The reason for the mute.")] [Remainder] string reason) { if (!await GetConfirmationIfRequiredAsync(subject)) { return; } var reasonWithUrls = AppendUrlsFromMessage(reason); await ModerationService.CreateInfractionAsync(Context.Guild.Id, Context.User.Id, InfractionType.Mute, subject.UserId, reasonWithUrls, duration); await ConfirmAndReplyWithCountsAsync(subject.UserId); }