I wanted to get the latest pinned message in the current channel but I don't know how to get the pinned message. If you guys know how to get the latest pinned message.

0 Answer
You will want to retrieve all the pins of a channel using channel.pins()
, as seen in the code below. This will give you a list
of messages, assuming the channel has pins.
pins = await ctx.channel.pins() # a list of all the channel's pins
await ctx.send(pins[0]) # sends all the information in the channel's first pin
await ctx.send(pins[0].content) # sends the content of the message.
# An error will occur if there is no message content
:
这家伙很懒,什么都没留下...