Deleting all messages in discord.js text channel

后端 未结 7 1596
梦如初夏
梦如初夏 2021-02-09 18:09

Ok, so I searched for a while, but I couldn\'t find any information on how to delete all messages in a discord channel. And by all messages I mean every single message ever writ

相关标签:
7条回答
  • 2021-02-09 19:06

    Here's @Kiyokodyele answer but with some changes.

    (async () => {
      let deleted;
      do {
        deleted = await channel.bulkDelete(100);
      } while (deleted.size != 0);
    })();
    
    0 讨论(0)
提交回复
热议问题