更正您的过滤器逻辑应该会修复您的DiscordAPIError异常,但为了确保没有发出错误的调用,您应该保护bulkDelete调用: if(botMessages.length >1) { message.channel.bulkDelete(botMessages); }elseif(botMessages.length) { botMessages[0].delete(); }else{// nothing to delete} ...
我尝试使用 bulkDelete 让我的机器人删除它的消息,但我收到此错误: (node:5724) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Bad Request (node:5724) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not ...
deleteDiscordMessages.user.js package-lock.json package.json rollup.config.mjs README MIT license ⚠️Any tool that automates actions on user accounts, including this one, could result in account termination.(seeself-bots). Use at your own risk! (discussion). ...
to basically delete a conversation, I've been running bulkDelete(100) on a large number previously it would delete everything it could, and then throw an API error, for example "you can't delete messages over 14 days old" but all the other messages up to the fail point would get dele...
在写对比文件差异的脚本时,运行脚本报错: TypeError: a bytes-like object is required, not ‘str’ 处理方法如下: 1.使用codecs模块 2.原代码为: fileHandle = open(filename, 'rb') #此写法用于python2.x版本,因为我的版本为python3.6,所以需要做以下更改 3.更改后的代码为 import codecs fileHa...
最近登陆 Google Adsense 后台,发现评分卡中收入评分很低,其中抓取工具错误很严重,这个错误的意思是 ...
Now, the traditional way to unsubscribe from a newsletter is – open the promotional email, and click on a smallunsubscribelink (usually in the footer). And that will do the job. But if you have subscribed to a dozen newsletters, then repeating the above process for each of them is quite...
Now, the traditional way to unsubscribe from a newsletter is – open the promotional email, and click on a smallunsubscribelink (usually in the footer). And that will do the job. But if you have subscribed to a dozen newsletters, then repeating the above process for each of them is quite...
Original file line numberDiff line numberDiff line change @@ -17,7 +17,7 @@ module Owner count+=1 end end unless@count.zero? unlesscount.zero? Discordrb::API::Channel.bulk_delete_messages(event.bot.token,event.channel.id,msgs) end else...
import java.util.Scanner; import java.util.HashMap; public class Main { public static void...