def get_guild_by_guild_id(guildId: int):
    row = Repos.get_guild_by_guild_id(guildId=guildId)
    if row is None:
        raise ValueError('GuildService.get_guild_by_guild_id(): returned row is null')
    return Guild(guildId=row[0], maxLinks=row[1], muteTime=row[2], personalRolesAllowed=row[3],
                 banBotFunctions=row[4], noLinksRoleId=row[5], lightMuteRoleId=row[6], muteRoleId=row[7],
                 muteVoiceChatRoleId=row[8], CHIELDChatId=row[9], CHIELDWarningCount=row[10],
                 CHIELDAlertCount=row[11], voiceChatCreatorId=row[12], membersCounterChatId=row[13],
                 rolesCounterChatId=row[14], welcomePhrase=row[15], welcomeGifGroupId=row[16])
def get_all_guilds():
    rows = Repos.get_all_guilds()
    guildList = []
    for row in rows:
        guild = Guild(guildId=row[0], maxLinks=row[1], muteTime=row[2], personalRolesAllowed=row[3],
                      banBotFunctions=row[4], noLinksRoleId=row[5], lightMuteRoleId=row[6], muteRoleId=row[7],
                      muteVoiceChatRoleId=row[8], CHIELDChatId=row[9], CHIELDWarningCount=row[10],
                      CHIELDAlertCount=row[11], voiceChatCreatorId=row[12], membersCounterChatId=row[13],
                      rolesCounterChatId=row[14], welcomePhrase=row[15], welcomeGifGroupId=row[16])
        guildList.append(guild)
    return guildList
def delete_guild_by_guild_id(guildId: int):
    Repos.delete_guild_by_guild_id(guildId=guildId)
def update_welcome_gif_group_id(guild: Guild):
    Repos.update_welcome_gif_group_id(guild=guild)
def update_guild_welcome_phrase(guild: Guild):
    Repos.update_guild_welcome_phrase(guild=guild)
def update_guild_chats(guild: Guild):
    Repos.update_guild_chats(guild=guild)
def add_new_guild(guildId: int):
    Repos.init_new_guild(guildId=guildId)
def update_guild_shield_settings(guild: Guild):
    Repos.update_guild_shield_settings(guild=guild)
def update_guild_roles(guild: Guild):
    Repos.update_guild_roles(guild=guild)
Пример #10
0
def update_guild_common(guild: Guild):
    Repos.update_guild_common(guild=guild)
Пример #11
0
def update_guild_full(guild: Guild):
    Repos.update_guild_full(guild=guild)
Пример #12
0
def get_guilds_count():
    return Repos.get_guilds_count()[0]
Пример #13
0
def clear_table():
    Repos.clear_table()