1

Hey I'm working on an event bot and im currently working on a repost function. The problem is there are people which are confussed on which post they musst accept so I want to delete the old message.

At the moment allways when I'm posting a message I save the message.id in my Database. I just saw this post: Get Message By ID: Discord.js where they told him to use msg.channel.fetchMessage()with a https://discord.js.org documentation but It seems like fetchMessage() doesn't exist anymore.

Is there any other function I can use for deleting a Message like msg.channel.fetchMessage(Databasemessage.id).delete()?

Iktal
  • 25
  • 1
  • 5

1 Answers1

2

It has moved to the MessageManager available from any TextChannel or DMChannel.

TextChannel.messages.fetch() DMChannel.messages.fetch()

Tarazed
  • 1,707
  • 1
  • 7
  • 22