2018-01-05 09:52:22 +01:00
|
|
|
from titanembeds.database import db
|
|
|
|
|
|
|
|
class DisabledGuilds(db.Model):
|
2018-01-23 22:08:55 +01:00
|
|
|
__tablename__ = "disabled_guilds" # Auto increment id
|
|
|
|
guild_id = db.Column(db.BigInteger, nullable=False, primary_key=True) # Server id that is disabled
|
2018-01-05 09:52:22 +01:00
|
|
|
|
|
|
|
def __init__(self, guild_id):
|
|
|
|
self.guild_id = guild_id
|
|
|
|
|
|
|
|
def list_disabled_guilds():
|
|
|
|
q = db.session.query(DisabledGuilds).all()
|
|
|
|
their_ids = []
|
|
|
|
for guild in q:
|
2018-01-29 19:23:54 +01:00
|
|
|
their_ids.append(str(guild.guild_id))
|
2018-01-05 09:52:22 +01:00
|
|
|
return their_ids
|