mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Added [user_perm()] support to medusa system
This commit is contained in:
24
src/Nadeko.Medusa/Attributes/user_permAttribute.cs
Normal file
24
src/Nadeko.Medusa/Attributes/user_permAttribute.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Discord;
|
||||
|
||||
namespace Nadeko.Snake;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class user_permAttribute : Attribute
|
||||
{
|
||||
public GuildPermission? GuildPerm { get; }
|
||||
public ChannelPermission? ChannelPerm { get; }
|
||||
|
||||
|
||||
public user_permAttribute(GuildPermission perm)
|
||||
{
|
||||
GuildPerm = perm;
|
||||
ChannelPerm = null;
|
||||
}
|
||||
|
||||
public user_permAttribute(ChannelPermission perm)
|
||||
{
|
||||
ChannelPerm = perm;
|
||||
GuildPerm = null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user