Beispiel #1
0
        public async Task ReportAsync(IUserMessage message, [Remainder] string reportMessage = null)
        {
            await Context.Channel.DeleteMessageAsync(Context.Message);

            await QuickReportWatcher.FileReport(message.Id, Context.User, message.Author, message.Channel, message,
                                                reportMessage);
        }
Beispiel #2
0
        public async Task ReportAsync(ulong reportId, [Remainder] string reportMessage = null)
        {
            if (Context.Channel is IGuildChannel)
            {
                await Context.Channel.DeleteMessageAsync(Context.Message);
            }

            await QuickReportWatcher.FileReport(reportId, Context.User, null, null, null, reportMessage);
        }
Beispiel #3
0
        public async Task ReportAsync(IUser user, [Remainder] string reportMessage = null)
        {
            if (Context.Guild != null)
            {
                await Context.Channel.DeleteMessageAsync(Context.Message);
            }

            if (string.IsNullOrEmpty(reportMessage))
            {
                throw new Exception("Please enter in a description of the report!");
            }

            var previous = Context.Guild != null?GetPreviousMessage(user) : null;

            var reportId = previous?.Id ?? SnowflakeUtils.ToSnowflake(DateTimeOffset.UtcNow);
            await QuickReportWatcher.FileReport(reportId, Context.User, user, Context.Channel, previous, reportMessage);
        }