久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Discord.js 無效的表單正文限制:int 值應小于或等于

Discord.js Invalid Form Body limit: int value should be less than or equal to 100.error when using bulkDelete()(Discord.js 無效的表單正文限制:int 值應小于或等于 100.使用 bulkDelete() 時出錯) - IT屋-程序員軟件開發(fā)技
本文介紹了Discord.js 無效的表單正文限制:int 值應小于或等于 100.使用 bulkDelete() 時出錯的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

所以我得到了這個作為命令代碼:

So I got this as the command code:

    if(!args[0]){
        message.channel.send(client.cmdlines.wrongUsage);
    }else if(args[1]){
        message.channel.send(client.cmdlines.wrongUsage);
    }else{
        if(message.member.hasPermission('ADMINISTRATOR')){
            if(!isNaN(args[0])){
                message.channel.bulkDelete(args[0]+1).then(msg => {
                    message.channel.send(`Deleted ${args[0]} messages.`).then(msg => msg.delete({ timeout: 3000 })).catch(e => console.log(e));
                });
            }else{
                message.channel.send(client.cmdlines.wrongUsage);
            }
        }else{
            message.channel.send(client.cmdlines.missingPerms);
        }
    }
}

由于某種原因,我得到了:無效的表單正文限制:int值應小于或等于100.錯誤.有人知道問題可能是什么

and for some reason im getting the: Invalid Form Body limit: int value should be less than or equal to 100. error. Does somebody know what possible the problem could be

推薦答案

在錯誤中.. discord.js 不允許您一次批量刪除超過 100 條消息.運行一個函數來確定您需要循環(huán)多少次才能刪除所有所需的消息 (Math.floor(args[0]/100).然后,您需要刪除數字從 100 條中留下的消息數. (args[0] - Math.floor(args[0])*100)

It’s in the error.. discord.js doesn’t allow you to bulk delete more than 100 messages at a time. Run a function to determine how many times you would need to cycle through to delete all the desired messages (Math.floor(args[0]/100). Then, you’ll need to delete the number of messages left from the 100. (args[0] - Math.floor(args[0])*100)

循環(huán)刪除第一個值的 100 條消息,然后刪除消息后的第二個值.

Cycle through deleting 100 messages the first value of times, then after delete messages the second value.

哦,請務必先將 args[0] 解析為 int

Oh, and make sure to parse args[0] into an int, first

這篇關于Discord.js 無效的表單正文限制:int 值應小于或等于 100.使用 bulkDelete() 時出錯的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發(fā)出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: 精品国产乱码一区二区三区a | 久久精品av麻豆的观看方式 | 亚洲国产成人在线视频 | 精品久久国产 | 国产精品1区 | 亚洲欧美日韩一区 | 精品一区二区电影 | 中文字幕视频在线看 | 国产午夜精品理论片a大结局 | 一级黄色片在线免费观看 | 国产亚洲精品久久yy50 | 久艹av| 亚洲欧美日韩在线 | 欧美成人a| 国产一区二区三区在线看 | 在线免费91 | 波霸ol一区二区 | 国产成人精品亚洲日本在线观看 | 欧美一区二区三区小说 | 一区二区三区在线看 | 免费在线观看毛片 | 欧美一级欧美一级在线播放 | 国产精品久久久久久久免费观看 | 亚洲精品一区中文字幕乱码 | 国产精品中文字幕在线 | 久久久久久蜜桃一区二区 | 午夜小视频免费观看 | 午夜伦理影院 | 欧美日日 | 精品久久久久久 | 人操人人干人 | 黄久久久| www.788.com色淫免费| 亚洲精品成人免费 | 国产精品毛片无码 | 亚洲精品一级 | 精品久久久久久亚洲综合网站 | 久久国产精品色av免费观看 | 偷牌自拍 | 精彩视频一区二区三区 | 精品中文字幕一区二区三区 |