mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-03 16:24:27 -05: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