示例#1
0
 def ensure(cls, guild, user, reason=None):
     User.ensure(user)
     obj, _ = cls.get_or_create(guild_id=guild.id,
                                user_id=user.id,
                                defaults=dict({
                                    'reason': reason,
                                }))
     return obj
示例#2
0
 def ensure(cls, guild, user, reason=None):
     from rowboat.models.user import User
     User.ensure(user)
     obj, _ = cls.get_or_create(guild_id=guild.id,
                                user_id=user.id,
                                defaults=dict({
                                    'reason': reason,
                                }))
     return obj