private static async Task Main() { var client = await DiscordSettings.GetClient(); var services = DiscordSettings.ConfigureServices(client); await DiscordSettings.InstallCommands(client, services); SocialScoreWatcher.Bind(client); CoronaWatcher.Bind(client); MuteWatcher.Bind(client); VoiceChat.Bind(client); GovernanceVoteWatcher.Bind(client); EditWatcher.Bind(client); QuickReportWatcher.Bind(client); StarboardWatcher.Bind(client); QuickChatWatcher.Bind(client); SlurWatcher.Bind(client); await Task.Delay(10000); var crawler = new Crawler(client); await Task.WhenAny(Task.Delay(TimeSpan.FromDays(2)), crawler.StartAsync()); throw new Exception("Restart me!"); }
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); }
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); }
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); }