Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there a way to get all the messages in a channel?

I want to create a /purge command to delete a certain amount of messages from a channel. Is there a way to get messages from a specific channel?

I can’t seem to find anything in the documentation that can get messages from a discord channel without the message ID.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Well, you can just use lib inbuilt channel.purge

or less suitable async for ... in channel.history

In both cases you need to make some sorta checking function.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading