I hereby claim:
- I am antitcb on github.
- I am antitcb (https://keybase.io/antitcb) on keybase.
- I have a public key ASBhkdf7teFnqbV3NITKjA45q6g3jaWagE13mLF548RGsgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
public class RequireRoleAttribute : RequireContextAttribute | |
{ | |
private ulong[] _roleIds; | |
private string[] _roleNames; | |
/// <summary> Requires that the command caller has ANY of the supplied role ids. </summary> | |
public RequireRoleAttribute(params ulong[] roleIds) : base(ContextType.Guild) | |
=> _roleIds = roleIds; | |
/// <summary> Requires that the command caller has ANY of the supplied role names. </summary> |
public static class ChannelExtensions { | |
public static async Task<IGuildChannel> CloneChannelAsync(this IGuildChannel channel, string newChannelName) | |
{ | |
if (channel.Guild is null) | |
throw new InvalidOperationException("The guild is detatched from this channel entity."); | |
IGuildChannel newChannel = null; | |
switch (channel) | |
{ | |
case ITextChannel tChannel: |
internal class TemplateMemberNameComparer : StringComparer | |
{ | |
public override int Compare(string x, string y) | |
=> string.Compare(Rename(x), Rename(y), true); | |
public override bool Equals(string x, string y) | |
=> string.Equals(Rename(x), Rename(y), StringComparison.OrdinalIgnoreCase); | |
public override int GetHashCode(string obj) | |
=> Rename(obj).GetHashCode(); |