Deleting all messages in discord.js text channel

后端 未结 7 1583
梦如初夏
梦如初夏 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);
    })();
    

提交回复
热议问题