import discord from os import listdir class Client(discord.Client): async def on_ready(self): print("Logged on as", self.user) channel = self.get_channel(373273190547324928) pins = await channel.pins() for msg in pins: msg = await channel.fetch_message(msg.id) for react in msg.reactions: if react.emoji == "📌": print("[PINNED]", ("%s#%s" % (msg.author.name, msg.author.discriminator)) + ":", msg.id) async for user in react.users(): print("[PIN]", ("%s#%s" % (user.name, user.discriminator)) + ":", msg.id) await self.logout() client = Client() client.run(open("token").read().strip())