feat: add role create/update responders
This commit is contained in:
parent
b5e34d517a
commit
48649feb14
5 changed files with 167 additions and 19 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System.Drawing;
|
||||
using Humanizer;
|
||||
using OneOf;
|
||||
using Remora.Discord.API.Abstractions.Objects;
|
||||
|
|
@ -48,6 +49,15 @@ public static class DiscordExtensions
|
|||
return snowflake.Value.Value;
|
||||
}
|
||||
|
||||
public static string ToPrettyString(this Color color)
|
||||
{
|
||||
var r = color.R.ToString("X2");
|
||||
var g = color.G.ToString("X2");
|
||||
var b = color.B.ToString("X2");
|
||||
|
||||
return $"#{r}{g}{b}";
|
||||
}
|
||||
|
||||
public static bool Is(this Optional<Snowflake> s1, Snowflake s2) => s1.IsDefined(out var value) && value == s2;
|
||||
public static bool Is(this Optional<Snowflake> s1, ulong s2) => s1.IsDefined(out var value) && value == s2;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue