Delete modules/common/emoji_accept.py
This commit is contained in:
		
							parent
							
								
									42385d19f6
								
							
						
					
					
						commit
						8c30453d36
					
				@ -1,24 +0,0 @@
 | 
			
		||||
# Accept/approve emoji set used across the bot.
 | 
			
		||||
# Works for both unicode and custom server emoji.
 | 
			
		||||
 | 
			
		||||
# Unicode emoji that should count as "accept"
 | 
			
		||||
ACCEPT_UNICODE = {"✅", "🫡", "❤️"}
 | 
			
		||||
 | 
			
		||||
# Custom emoji short names that should count as "accept"
 | 
			
		||||
# Add names (not the <:name:id> literal) for any server emoji you want.
 | 
			
		||||
ACCEPT_CUSTOM_NAMES = {"diverOK"}
 | 
			
		||||
 | 
			
		||||
def is_accept(emoji) -> bool:
 | 
			
		||||
    """
 | 
			
		||||
    Return True if the given emoji should count as an 'accept' reaction.
 | 
			
		||||
    Compatible with Reaction.emoji and RawReactionActionEvent.emoji.
 | 
			
		||||
    """
 | 
			
		||||
    try:
 | 
			
		||||
        # unicode path
 | 
			
		||||
        if str(emoji) in ACCEPT_UNICODE:
 | 
			
		||||
            return True
 | 
			
		||||
        # custom emoji path (has a .name)
 | 
			
		||||
        name = getattr(emoji, "name", None)
 | 
			
		||||
        return name in ACCEPT_CUSTOM_NAMES
 | 
			
		||||
    except Exception:
 | 
			
		||||
        return False
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user