Clarify permabanned forbidden messages.
Fixes #221. Provides custom message behavior for the user DM route and slightly refactors the `@is_not_permabanned` wrapper to not be deliberately misleading to users.
This commit is contained in:
parent
e1244e9496
commit
b2773cbb40
3 changed files with 9 additions and 3 deletions
|
@ -617,6 +617,9 @@ class User(Base):
|
|||
def is_suspended(self):
|
||||
return (self.is_banned and (self.unban_utc == 0 or self.unban_utc > time.time()))
|
||||
|
||||
@property
|
||||
def is_suspended_permanently(self):
|
||||
return (self.is_banned and self.unban_utc == 0)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue