Beispiel #1
0
 def deactivate(mute_id: int,
                unmute_mod: int = None,
                reason: str = None) -> "Mute":
     row: Mute = db.get(Mute, mute_id)
     row.active = False
     row.deactivation_timestamp = datetime.utcnow()
     row.unmute_mod = unmute_mod
     row.unmute_reason = reason
     return row
Beispiel #2
0
 def deactivate(ban_id: int,
                unban_mod: int = None,
                unban_reason: str = None) -> "Ban":
     row: Ban = db.get(Ban, ban_id)
     row.active = False
     row.deactivation_timestamp = datetime.utcnow()
     row.unban_mod = unban_mod
     row.unban_reason = unban_reason
     return row
Beispiel #3
0
 def update(guild_id: int, code: str, guild_name: str):
     row: AllowedInvite = db.get(AllowedInvite, guild_id)
     row.code = code
     row.guild_name = guild_name
Beispiel #4
0
 def post(post_id: str) -> bool:
     if db.get(RedditPost, post_id) is not None:
         return False
     RedditPost.create(post_id)
     return True
Beispiel #5
0
 def change_timestamp(user_id: int, timestamp: datetime):
     row: Searcher = db.get(Searcher, user_id)
     row.enqueued_at = timestamp
 def change_owner(channel_id: int, owner: int):
     row: DynamicVoiceChannel = db.get(DynamicVoiceChannel, channel_id)
     row.owner = owner
Beispiel #7
0
 def remove(channel_id: int):
     db.delete(db.get(LogExclude, channel_id))
Beispiel #8
0
 def change_state(user_id: int, state: State):
     row: Searcher = db.get(Searcher, user_id)
     row.state = state
Beispiel #9
0
 def exists(channel_id: int) -> bool:
     return db.get(LogExclude, channel_id) is not None
Beispiel #10
0
 def change_last_contact(user_id: int, last_contact: DateTime):
     row: Donator = db.get(Donator, user_id)
     row.last_contact = last_contact
Beispiel #11
0
 def change_state(user_id: int, state: State):
     row: Donator = db.get(Donator, user_id)
     row.state = state
Beispiel #12
0
 def change_used_invites(user_id: int, used_invites: int):
     row: Donator = db.get(Donator, user_id)
     row.used_invites = used_invites
Beispiel #13
0
 def change_invite_count(user_id: int, invite_count: int):
     row: Donator = db.get(Donator, user_id)
     row.invite_count = invite_count