private async Task UsersAsync() { await Context.Message.DeleteAsync(); var bot = LCommandHandler.GetBot(); int guilds = bot.Guilds.Count; int users = (await Context.Guild.GetUsersAsync()).Count; int total = 0; foreach (var guild in bot.Guilds) { total += guild.Users.Count; } EmbedBuilder embed = new EmbedBuilder() { Title = "Lori's Angels Statistics", Color = Color.DarkPurple, Description = $"Out of the {guilds} guilds I am watching {total} total users, {users} of which are from this guild!", Footer = new EmbedFooterBuilder() { Text = $"{EmojiUtil.GetRandomEmoji()} Requested by {Context.User.Username}#{Context.User.Id}" } }; await Context.Channel.SendMessageAsync(null, false, embed.Build()); }
private async Task RequestDataAsync() { var dm = await Context.User.GetOrCreateDMChannelAsync(); await dm.SendMessageAsync("**You have requested your data to be deleted.**\nYour request will be processed and you will receive a message confirming the deletion of your data. You must be in a server with this bot in order to receive the confirmation.\n\nPlease note that your data will be regenerated as needed if you remain in a server with the bot, as it is required for the bot to operate."); var logChannel = LCommandHandler.GetBot().GetGuild(730573219374825523).GetTextChannel(808283333623939093); await logChannel.SendMessageAsync($"User {Context.User.Id} has requested their data to be deleted."); }
private async Task MessageOwnerAsync([Remainder] string message = null) { if (message == null) { BotConfig conf = BotConfig.Load(); var gconf = conf.GetConfig(Context.Guild.Id); await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "Incorrect Command Usage", $"Correct Usage: `{gconf.Prefix}messageowner <message>`", false); return; } var logChannel = LCommandHandler.GetBot().GetGuild(730573219374825523).GetTextChannel(808283416533270549); await logChannel.SendMessageAsync($"-- -- -- -- --\n**From:** {Context.User.Username}#{Context.User.Discriminator} ({Context.User.Id})\n**Time:** {DateTime.Now}\n\n{message}\n-- -- -- -- --"); await Context.Channel.SendMessageAsync("Message sent."); }
private async Task ConfirmDataAsync(ulong id = 0L) { if (Context.User.Id != 211938243535568896) { return; } if (id == 0L) { await MessageUtil.SendErrorAsync(Context.Channel as ITextChannel, "Error", "Need an ID"); } var user = LCommandHandler.GetBot().GetUser(id); var dm = await user.GetOrCreateDMChannelAsync(); await dm.SendMessageAsync("**Your data has been deleted successfully.**\n\nPlease note that your data will be regenerated as needed if you remain in a server with the bot, as it is required for the bot to operate."); await Context.Channel.SendMessageAsync("Done."); }