1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 09:09:00 +03:00
Octobot/Boyfriend/Utils.cs
2021-12-07 23:27:27 +05:00

25 lines
No EOL
789 B
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 + ">";
}
}