Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static async Task<Embed> ApplicationEmbed(ulong channelID)
- {
- //var j = "\u1cbc\u1cbc\u1cbc\u1cbc\u1cbc<:joiner_small:1072887158874062958>";
- var j = "\u1cbc\u1cbc\u1cbc\u1cbc\u1cbc:regional_indicator_a:";
- Console.WriteLine("embedbuilder");
- var average = await GetAverageTime();
- var unix = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
- Console.WriteLine("Average seconds " + average.average + " | Last 1hr: " + average.averageHr);
- var application = await GetApplication(channelID);
- var user = await _client!.GetUserAsync(application.UserID);
- if (application == null || average == null || user == null)
- {
- Console.WriteLine("Didn't pass null checks on embedbuilder. - " + $"Application: {application ?? null}, Average: {average ?? null}, User: {user ?? null}");
- return null!;
- }
- var stats = await GetStats(playerName: application.a1!);
- var embedBuilder = new EmbedBuilder();
- embedBuilder.WithTitle($":wave: Hey {(user.GlobalName ?? user.Username)}, welcome to **Rs Burnt**!");
- embedBuilder.WithThumbnailUrl(user.GetAvatarUrl() ?? user.GetDefaultAvatarUrl());
- embedBuilder.WithDescription($"Thank you for submitting an application. An <@&{_settings["moderatorRole"]}> or <@&{_settings["helperRole"]}> will be with you shortly to give you full access to the discord");
- double a = average.average;
- double aH = average.averageHr;
- embedBuilder.AddField("**Average staff response time(All time):**", a > 0 ? $"{TimeSpan.FromSeconds(a).Humanize(3)} (<t:{(ulong)unix + a}:R>)\n" : "No data.");
- embedBuilder.AddField("**Average staff response time(Last 1hr):**", aH > 0 ? $"{TimeSpan.FromSeconds(aH).Humanize(3)} (<t:{(ulong)unix + aH}:R>)\n" : "No data.");
- embedBuilder.AddField("**Questions/Answers:**", "** **");
- /*embedBuilder.AddField("1. :regional_indicator_q: What is your RuneScape in-game name?", $"{j} `{application.a1}` ({(stats ? ":white_check_mark:Stats found" : ":x:Stats not found")})");
- embedBuilder.AddField("2. :regional_indicator_q: How did you find out about the discord?", $"{j} `{application.a2}`");
- embedBuilder.AddField("3. :regional_indicator_q: Do you collect or resell?", $"{j} `{application.a3}`");
- embedBuilder.AddField("4. :regional_indicator_q: Did you read, and agree to follow the rules?", $"{j} `{application.a4}`");
- embedBuilder.AddField("5. :regional_indicator_q: In your own words, what is rule #3 about?", $"{j} `{application.a5}`\n");*/
- embedBuilder.AddField("1.", $">>> :regional_indicator_q: **What is your RuneScape in-game name?**\n:regional_indicator_a: `{application.a1}` ({(stats ? ":white_check_mark:Stats found" : ":x:Stats not found")})");
- embedBuilder.AddField("2.", $">>> :regional_indicator_q: **How did you find out about the discord?**\n:regional_indicator_a: `{application.a2}`");
- embedBuilder.AddField("3.", $">>> :regional_indicator_q: **Do you collect or resell?**\n:regional_indicator_a: `{application.a3}`");
- embedBuilder.AddField("4.", $">>> :regional_indicator_q: **Did you read, and agree to follow the rules?**\n:regional_indicator_a: `{application.a4}`");
- embedBuilder.AddField("5.", $">>> :regional_indicator_q: **In your own words, what is rule #3 about?**\n:regional_indicator_a: `{application.a5}`\n");
- embedBuilder.AddField("** **", ":arrow_down: _If you need to edit your answers, click one of the buttons below_");
- //.WithFooter(":arrow_down: _If you need to edit your answers, click the button below_")
- embedBuilder.WithColor(Color.Blue);
- return await Task.FromResult(embedBuilder.Build());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement