Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Testing command
- @commands.command()
- @commands.guild_only()
- async def testing(self, ctx, *, role: discord.Role):
- """Test????"""
- from redbot.core.utils.chat_formatting import pagify
- from redbot.core.utils.menus import DEFAULT_CONTROLS, menu
- guild = ctx.guild
- sharky = guild.get_role(role)
- msg = ""
- for member in role.members():
- msg += f"{member.mention}\n"
- msg_list = []
- for page in pagify(msg, ["\n"]):
- embed = discord.Embed(color=0xEE2222)
- embed.description = page
- embed.set_author(name=guild.name + (f" Users in {sharky}"), icon_url=guild.icon_url)
- msg_list.append(embed)
- await menu(ctx, msg_list, DEFAULT_CONTROLS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement