I'm trying to make my bot delete all DM's from a user ID.(我试图让我的机器人从用户ID中删除所有DM。)
How would I get about doing this?(我将如何做呢?) I have tried using the DMchannel function but I am struggling.(我已经尝试使用DMchannel函数,但是我很挣扎。) The following code is what I have tried(以下代码是我尝试过的)
const dmCount = client.users.get("508625644792446986").dmChannel
var fetched = dmCount.fetchMessages({limit: 99});
dmCount.bulkDelete(fetched)
I don't see what I'm doing wrong here, any suggestions on how to fix this?(我在这里看不到我在做什么错,关于如何解决此问题的任何建议?)
The error is:(错误是:)
TypeError: Cannot read property 'fetchMessages' of null
ask by Surve translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…