我在检查用户拥有的角色时遇到了一个小问题。我最近收到了一个 if member_role in message.author.roles] AttributeError: 'User' object has no attribute 'roles' 在检查消息作者是否具有这些角色时,我似乎不能将roles与message参数一起传递。message):
if not isinstance(message.channel, discord.DMChan
以下是模型: email = models.EmailField('email address',(self, email, password, **extra_fields): Creates and saves a User with the given email and= self.model(email=email, **extra_fields)
user