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

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

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

問題描述

所以我得到了這個(gè)作為命令代碼:

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值應(yīng)小于或等于100.錯(cuò)誤.有人知道問題可能是什么

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

推薦答案

在錯(cuò)誤中.. discord.js 不允許您一次批量刪除超過 100 條消息.運(yùn)行一個(gè)函數(shù)來確定您需要循環(huán)多少次才能刪除所有所需的消息 (Math.floor(args[0]/100).然后,您需要?jiǎng)h除數(shù)字從 100 條中留下的消息數(shù). (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)刪除第一個(gè)值的 100 條消息,然后刪除消息后的第二個(gè)值.

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

哦,請(qǐng)務(wù)必先將 args[0] 解析為 int

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

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

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

相關(guān)文檔推薦

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(如何讓我的機(jī)器人提及發(fā)出該機(jī)器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復(fù)必須使用導(dǎo)入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務(wù)器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復(fù)“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務(wù)器時(shí)的歡迎消息)
主站蜘蛛池模板: 欧美日韩国产精品一区二区 | 中文一区 | 视频一区二区在线观看 | 97国产精品 | 91不卡 | 1204国产成人精品视频 | 国产视频线观看永久免费 | 亚洲综合天堂网 | 一区二区视频在线观看 | 国产成人免费网站 | 日本一区二区视频 | 午夜亚洲| 91中文 | 久久蜜桃av一区二区天堂 | 中文字幕 在线观看 | 91网站在线观看视频 | 亚洲成人动漫在线观看 | 久久国产精品-久久精品 | 欧美性另类 | 亚洲成人精品 | 一区日韩 | 国产成人精品一区二区三区在线 | 99精品国产一区二区青青牛奶 | 国产午夜精品一区二区三区嫩草 | 亚洲自拍偷拍视频 | 九色91视频 | 日本小电影网站 | 日韩中文字幕一区二区 | 日本午夜免费福利视频 | 国产精品久久777777 | 国产亚洲精品久久久优势 | 超碰网址| 国产日韩欧美一区二区 | 欧美日韩精品综合 | 久久久五月天 | 久久久久久亚洲精品 | 亚州毛片| 一区二区成人 | 亚洲女人天堂网 | 日韩中文字幕在线观看视频 | 午夜在线免费观看 |