Im kinda new to discord bot and python so I am running into a little trouble understanding where I am going wrong. Basically I want to get my bot to pin a message. I found a documentation for python code which says to use pin_message() so i have:
if "pinm()" == message.content.lower():
#to pin a message
message.channel.pin_message(messageID)
but i get the following error AttributeError: 'TextChannel' object has no attribute 'pin_message'
When I look at the Discord documentation it says PUT /channels/{channel.id}/pins/{message.id} I dont really understand how to translate this down to code so i have something like this:
if "pinm()" == message.content.lower():
#to pin a message
allPins = message.channel.pins(messageID)
but i get the error pins() takes 1 positional argument but 2 were given. The sources i am following are
https://discordapp.com/developers/docs/resources/channel#add-pinned-channel-message
https://discordpy.readthedocs.io/en/latest/api.html#message
Can anyone tell me where I am going wrong with this? :(
await client.pin_message(message)- Minn