This repository has been archived on 2024-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
OctobotStealth/Boyfriend/Utils.cs

25 lines
789 B
C#
Raw Normal View History

2021-12-07 23:27:27 +05:00
using Discord;
namespace Boyfriend;
2021-12-07 17:52:37 +05:00
public static class Utils {
public static string GetBeep() {
var letters = new[] { "а", "о", "и"};
return "Б" + letters[new Random().Next(3)] + "п! ";
}
2021-12-07 23:27:27 +05:00
[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 + ">";
}
2021-12-07 17:52:37 +05:00
}