# Path: bot/users/models.py
# class Member(models.Model):
#     discord_id = models.CharField(max_length=50, unique=True)
#     name = models.CharField(_('name'), max_length=255)
#     last_seen = models.DateTimeField(null=True, blank=True)
# 
#     is_bot = models.BooleanField(default=False)
#     can_admin_bot = models.BooleanField(default=False)
# 
#     objects = MemberQuerySet.as_manager()
# 
#     def __str__(self):
#         return '<@{} name={}>'.format(self.discord_id, self.name)


from django.conf import settings
from .models import Member



def is_bot_admin(message):
    """
    Takes a message and decides whether the author has admin status or not.
    """
    author_id = message.author.id

# Path: bot/users/models.py
# class Member(models.Model):
#     discord_id = models.CharField(max_length=50, unique=True)
#     name = models.CharField(_('name'), max_length=255)
#     last_seen = models.DateTimeField(null=True, blank=True)
# 
#     is_bot = models.BooleanField(default=False)
#     can_admin_bot = models.BooleanField(default=False)
# 
#     objects = MemberQuerySet.as_manager()
# 
#     def __str__(self):
#         return '<@{} name={}>'.format(self.discord_id, self.name)


# Path: bot/users/utils.py
from django.conf import settings
from .models import Member




def is_bot_admin(message):
    """
    Takes a message and decides whether the author has admin status or not.
    """
    author_id = message.author.id

    qs = Member.objects.filter(discord_id=author_id, can_admin_bot=True)