utils/announcements.py
async def fetch_bot_announcements(cls, ctx, bot_id: int, limit = None, *, oldest: bool = False, is_unique: bool = False) -> typing.List[Announcement]:
        """
            Gets all bot announcements via their id and returns an Announement object if successful.

            bot_id: the bot's id.
            limit: the amount of announcements you want, None for all.
            oldest: sort announcement on oldest.
            is_unique: determine if the bot_id is the bot's unique ID instead of the user id.
        """
        bot_id = await _get_unique_id(ctx, "BOT", bot_id)
        if is_unique:
            bot_id = bot_id

        limit = limit or "ALL"
        query = "SELECT * FROM main_site_announcement WHERE bot_id = $1 ORDER BY time DESC LIMIT {}"
        if oldest:
            query = "SELECT * FROM main_site_announcement WHERE bot_id = $1 ORDER BY time ASC LIMIT {}"

        announcements_fetched = await ctx.bot.pool.fetch(query.format(limit), int(bot_id))
        returning_announcements = []
        for x in announcements_fetched:
            returning_announcements.append(cls(x))

        return returning_announcements

            Gets all bot announcements via their id and returns an Announement object if successful.

            bot_id: the bot's id.
            limit: the amount of announcements you want, None for all.
            oldest: sort announcement on oldest.
            is_unique: determine if the bot_id is the bot's unique ID instead of the user id.
        
Gets all bot announcements via their id and returns an Announement object if successful.
bot_id: the bot's id.
limit: the amount of announcements you want, None for all.
oldest: sort announcement on oldest.
is_unique: determine if the bot_id is the bot's unique ID instead of the user id.
Gets all bot announcements via their id and returns an Announement object if successful . bot_id : the bot ' s id . limit : the amount of announcements you want None for all . oldest : sort announcement on oldest . is_unique : determine if the bot_id is the bot ' s unique ID instead of the user id .
async def fetch_bot_announcements(cls, ctx, bot_id: int, limit = None, *, oldest: bool = False, is_unique: bool = False) -> typing.List[Announcement]:
        bot_id = await _get_unique_id(ctx, "BOT", bot_id)
        if is_unique:
            bot_id = bot_id
        limit = limit or "ALL"
        query = "SELECT * FROM main_site_announcement WHERE bot_id = $1 ORDER BY time DESC LIMIT {}"
        if oldest:
            query = "SELECT * FROM main_site_announcement WHERE bot_id = $1 ORDER BY time ASC LIMIT {}"
        announcements_fetched = await ctx.bot.pool.fetch(query.format(limit), int(bot_id))
        returning_announcements = []
        for x in announcements_fetched:
            returning_announcements.append(cls(x))
        return returning_announcements
async def fetch_bot_announcements ( cls , ctx , bot_id : int , limit = None , * , oldest : bool = False , is_unique : bool = False ) -> typing . List [ Announcement ] : bot_id = await _get_unique_id ( ctx , "BOT" , bot_id ) if is_unique : bot_id = bot_id limit = limit or "ALL" query = "SELECT * FROM main_site_announcement WHERE bot_id = $1 ORDER BY time DESC LIMIT {}" if oldest : query = "SELECT * FROM main_site_announcement WHERE bot_id = $1 ORDER BY time ASC LIMIT {}" announcements_fetched = await ctx . bot . pool . fetch ( query . format ( limit ) , int ( bot_id ) ) returning_announcements = [ ] for x in announcements_fetched : returning_announcements . append ( cls ( x ) ) return returning_announcements
Gets all bot announcements via their id and returns an Announement object if successful.
Gets all bot announcements via their id and returns an Announement object if successful .
"""
            Gets all bot announcements via their id and returns an Announement object if successful.

            bot_id: the bot's id.
            limit: the amount of announcements you want, None for all.
            oldest: sort announcement on oldest.
            is_unique: determine if the bot_id is the bot's unique ID instead of the user id.
        """
cls
ctx
bot_id
int
limit
oldest
bool
is_unique
bool