utils/announcements.py
async def edit(self, ctx, new_content: str, bot_id: int) -> typing.Optional[Announcement]:
        """ Edit an announcement with check if bot id matches the announcement bot id. """
        announcement_bot = await self.get_bot_object(ctx)
        if announcement_bot.id == bot_id:
            bot_id = await _get_unique_id(ctx, "BOT", bot_id)
            returned_columns = await ctx.bot.pool.fetchrow(
                "UPDATE main_site_announcement SET announcement = $1 WHERE unique_id = $2 AND bot_id = $3 RETURNING *",
                str(new_content), int(self.id), int(bot_id))
            return Announcement(returned_columns)

        return None
 Edit an announcement with check if bot id matches the announcement bot id. 
Edit an announcement with check if bot id matches the announcement bot id.
Edit an announcement with check if bot id matches the announcement bot id .
async def edit(self, ctx, new_content: str, bot_id: int) -> typing.Optional[Announcement]:
        announcement_bot = await self.get_bot_object(ctx)
        if announcement_bot.id == bot_id:
            bot_id = await _get_unique_id(ctx, "BOT", bot_id)
            returned_columns = await ctx.bot.pool.fetchrow(
                "UPDATE main_site_announcement SET announcement = $1 WHERE unique_id = $2 AND bot_id = $3 RETURNING *",
                str(new_content), int(self.id), int(bot_id))
            return Announcement(returned_columns)
        return None
async def edit ( self , ctx , new_content : str , bot_id : int ) -> typing . Optional [ Announcement ] : announcement_bot = await self . get_bot_object ( ctx ) if announcement_bot . id == bot_id : bot_id = await _get_unique_id ( ctx , "BOT" , bot_id ) returned_columns = await ctx . bot . pool . fetchrow ( "UPDATE main_site_announcement SET announcement = $1 WHERE unique_id = $2 AND bot_id = $3 RETURNING *" , str ( new_content ) , int ( self . id ) , int ( bot_id ) ) return Announcement ( returned_columns ) return None
Edit an announcement with check if bot id matches the announcement bot id.
Edit an announcement with check if bot id matches the announcement bot id .
""" Edit an announcement with check if bot id matches the announcement bot id. """
self
ctx
new_content
str
bot_id
int