discord

I keep getting this error on my discord bot: 'HTTPError [AbortError]: The user aborted a request.'

﹥>﹥吖頭↗ 提交于 2020-06-29 04:11:29
问题 What does this mean, and how do I fix it, I know for a fact my code is correct and nothing is wrong with it, I checked with multiple friends. I have no idea why this is happening and I need my bot to start working soon. 回答1: This is an error happening within the discord.js library if a web request is stuck for a long time, which might happen due to an outage or bad internet connection. Those connections are killed with that error message to free resources. Those errors should not be fatal and

Make admins not kick each other

倾然丶 夕夏残阳落幕 提交于 2020-06-29 03:57:06
问题 Making a kick command. I am trying to make a command so that the admins cannot kick each other. if(message.author.hasPermission('KICK_MEMBER', 'ADMINISTRATOR') && message.member.hasPermission('KICK_MEMBER', 'ADMINISTRATOR')) return ('You cant kick another admin!') But I get an error. TypeError: message.author.hasPermission is not a function 回答1: So basically you are trying to use message.author.hasPermission('permission') . The property author of the message object is a User , which is a

How does bulkDelete work?

两盒软妹~` 提交于 2020-06-28 04:12:42
问题 I tried using bulkDelete to make my bot delete its message but I get this error: (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 handled will terminate the Node.js process with a non-zero exit code. And here is my code: const Discord = require('discord.js'); const bot = new Discord.Client(); const config =

How does bulkDelete work?

佐手、 提交于 2020-06-28 04:12:23
问题 I tried using bulkDelete to make my bot delete its message but I get this error: (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 handled will terminate the Node.js process with a non-zero exit code. And here is my code: const Discord = require('discord.js'); const bot = new Discord.Client(); const config =

Discord.js How to check if the user does not accept Direct Messages

不问归期 提交于 2020-06-25 05:35:10
问题 I was wondering if it is possible for a Discord bot to be able to check if a specific user the bot is trying to DM accepts direct messages. Right now this is my code: exports.run = (client, message) => { try { message.author.send(`:ok_hand:`); } catch (err) { message.reply('Cannot send Direct Messages to your user!'); } } But I want the code to be able to tell if the user is accepting direct messages before trying to send the user a message. Is this doable? 回答1: Its not possible. The only way

NoneType object has no attribute id [closed]

ε祈祈猫儿з 提交于 2020-06-23 18:11:12
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 days ago . Improve this question It should take the role ID next to the server ID in Json and define it as a silent role, but it gives an error and I don't know what the error is. Please help me discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has

NoneType object has no attribute id [closed]

走远了吗. 提交于 2020-06-23 18:07:45
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 days ago . Improve this question It should take the role ID next to the server ID in Json and define it as a silent role, but it gives an error and I don't know what the error is. Please help me discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has

Discord bot commands not working on reaction roles (Discord PY)

妖精的绣舞 提交于 2020-06-23 14:02:06
问题 When i go to execute my script it shows me this error. Not sure what it is but please help me! Error shown This was the error shown when i ran my bot. I have no clue but i was trying to set up reaction roles and this popped up @bot.event() TypeError: event() missing 1 required positional argument: 'coro' Part of script with error This is the part of the script the error directing me to telling me it was there! @bot.event() async def on_raw_reaction_add(payload): message_id = payload.message

JDA - send message

此生再无相见时 提交于 2020-06-21 05:44:07
问题 I have my own Discord BOT based on JDA. I need to send a text message to the specific channel. I know how to send the message as onEvent response, but in my situation I do not have such event. I have: Author (BOT), Token and Channel number. My question is: how to send the message to this channel without an event ? 回答1: Ok I think I know what you mean. You don't need to have an event to get an ID of a channel and send a message. The only thing you need to do is to instantiate the JDA, call

How to define objects in discord.py rewrite

点点圈 提交于 2020-06-17 00:50:49
问题 As stated in the title, how? I'm really struggling with understanding the documentation as there are no examples of anything. How do I define something like a VoiceState, Member, VoiceChannel, etc... Running on tutorials is fine until you have to start consulting the documentation for something specific, at which point it becomes really frustrating when you have no idea how to define objects or use certain commands... 回答1: A lot of this will come from experience, so don't be discouraged if it