1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-03 04:29:54 +03:00
This commit is contained in:
l1ttleO 2021-12-07 23:27:27 +05:00
parent 3fa19a4794
commit 8644f70b14
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
7 changed files with 158 additions and 37 deletions

View file

@ -1,8 +1,25 @@
namespace Boyfriend;
using Discord;
namespace Boyfriend;
public static class Utils {
public static string GetBeep() {
var letters = new[] { "а", "о", "и"};
return "Б" + letters[new Random().Next(3)] + "п! ";
}
[Obsolete("Stop hard-coding things!")]
public static IMessageChannel GetAdminLogChannel() {
if (Boyfriend.Client.GetChannel(870929165141032971) is not IMessageChannel adminLogChannel)
throw new ArgumentException("Invalid admin log channel");
return adminLogChannel;
}
public static string Wrap(string original) {
return original.Trim().Equals("") ? "" : "```" + original.Replace("```", "```") + "```";
}
public static string MentionChannel(ulong id) {
return "<#" + id + ">";
}
}