@@ -1637,8 +1637,6 @@ async def contact(
16371637 async def blocked (self , ctx ):
16381638 """Retrieve a list of blocked users."""
16391639
1640- embeds = [discord .Embed (title = "Blocked Users" , color = self .bot .main_color , description = "" )]
1641-
16421640 roles = []
16431641 users = []
16441642 now = ctx .message .created_at
@@ -1700,43 +1698,54 @@ async def blocked(self, ctx):
17001698 if role :
17011699 roles .append ((role .mention , reason ))
17021700
1701+ user_embeds = [discord .Embed (title = "Blocked Users" , color = self .bot .main_color , description = "" )]
1702+
17031703 if users :
1704- embed = embeds [0 ]
1704+ embed = user_embeds [0 ]
17051705
17061706 for mention , reason in users :
17071707 line = mention + f" - { reason or 'No Reason Provided' } \n "
17081708 if len (embed .description ) + len (line ) > 2048 :
17091709 embed = discord .Embed (
1710- title = "Blocked Users (Continued) " ,
1710+ title = "Blocked Users" ,
17111711 color = self .bot .main_color ,
17121712 description = line ,
17131713 )
1714- embeds .append (embed )
1714+ user_embeds .append (embed )
17151715 else :
17161716 embed .description += line
17171717 else :
1718- embeds [0 ].description = "Currently there are no blocked users."
1718+ user_embeds [0 ].description = "Currently there are no blocked users."
1719+
1720+ if len (user_embeds ) > 1 :
1721+ for n , em in enumerate (user_embeds ):
1722+ em .title = f'{ em .title } [{ n + 1 } ]'
17191723
1720- embeds . append ( discord .Embed (title = "Blocked Roles" , color = self .bot .main_color , description = "" ))
1724+ role_embeds = [ discord .Embed (title = "Blocked Roles" , color = self .bot .main_color , description = "" )]
17211725
17221726 if roles :
1723- embed = embeds [- 1 ]
1727+ embed = role_embeds [- 1 ]
17241728
17251729 for mention , reason in roles :
17261730 line = mention + f" - { reason or 'No Reason Provided' } \n "
17271731 if len (embed .description ) + len (line ) > 2048 :
1732+ role_embeds [- 1 ].set_author ()
17281733 embed = discord .Embed (
1729- title = "Blocked Roles (Continued) " ,
1734+ title = "Blocked Roles" ,
17301735 color = self .bot .main_color ,
17311736 description = line ,
17321737 )
1733- embeds .append (embed )
1738+ role_embeds .append (embed )
17341739 else :
17351740 embed .description += line
17361741 else :
1737- embeds [- 1 ].description = "Currently there are no blocked roles."
1742+ role_embeds [- 1 ].description = "Currently there are no blocked roles."
17381743
1739- session = EmbedPaginatorSession (ctx , * embeds )
1744+ if len (role_embeds ) > 1 :
1745+ for n , em in enumerate (role_embeds ):
1746+ em .title = f'{ em .title } [{ n + 1 } ]'
1747+
1748+ session = EmbedPaginatorSession (ctx , * user_embeds , * role_embeds )
17401749
17411750 await session .run ()
17421751
0 commit comments