Comments (10)
The event requires no permissions and is always received unless a HTTP interaction endpoint is set.
Is your bot online? Are you calling client.login();
? Can you confirm whether HTTP requests go thru the configured ProxyAgent
?
from discord.js.
The event requires no permissions and is always received unless a HTTP interaction endpoint is set.
Is your bot online? Are you calling
client.login();
? Can you confirm whether HTTP requests go thru the configuredProxyAgent
?
yeah, i invoke login
width my bot token. sorry, i forget to show that. I confirm my http request is correct. i can listen the channel message on messageCreate
event. but i am dont't receive the interactionCreate
event.
so I would like to confirm again if it is possible to send commands(/info
) within the channel to trigger interactionCreate
event?
from discord.js.
The event requires no permissions and is always received unless a HTTP interaction endpoint is set.
Is your bot online? Are you calling
client.login();
? Can you confirm whether HTTP requests go thru the configuredProxyAgent
?
Or how should I correctly trigger this event?
from discord.js.
The event requires no permissions and is always received unless a HTTP interaction endpoint is set.
Is your bot online? Are you callingclient.login();
? Can you confirm whether HTTP requests go thru the configuredProxyAgent
?yeah, i invoke
login
width my bot token. sorry, i forget to show that. I confirm my http request is correct. i can listen the channel message onmessageCreate
event. but i am dont't receive theinteractionCreate
event. so I would like to confirm again if it is possible to send commands(/info
) within the channel to triggerinteractionCreate
event?
Is it a message, or is it a slash command? It can't be both, and will not trigger both.
Slash Commands must be deployed to Discord in order for users to execute them and trigger interactionCreate
.
https://discordjs.guide/creating-your-bot/slash-commands.html#before-you-continue
from discord.js.
The event requires no permissions and is always received unless a HTTP interaction endpoint is set.
Is your bot online? Are you calling
client.login();
? Can you confirm whether HTTP requests go thru the configuredProxyAgent
?yeah, i invoke
login
width my bot token. sorry, i forget to show that. I confirm my http request is correct. i can listen the channel message onmessageCreate
event. but i am dont't receive theinteractionCreate
event. so I would like to confirm again if it is possible to send commands(/info
) within the channel to triggerinteractionCreate
event?Is it a message, or is it a slash command? It can't be both, and will not trigger both.
Slash Commands must be deployed to Discord in order for users to execute them and trigger
interactionCreate
.https://discordjs.guide/creating-your-bot/slash-commands.html#before-you-continue
thank you,your reply give me great understanding of it,but I have a little bit of problem,I join the midjourney in my guild,on one of the channels,Can my robot listen to users using midjournal's built-in commands to trigger interactionCreate event?
from discord.js.
You've lost me. Even if your bot was somehow added to the Midjourney server, no, you cannot listen to the commands of a different bot.
from discord.js.
You've lost me. Even if your bot was somehow added to the Midjourney server, no, you cannot listen to the commands of a different bot.
so I can only use the user token to create a websocket connection in order to listen midjourney's commands and message,right?
from discord.js.
That would be self-botting, which is against Discord's Terms of Service, may result in your account being banned, and will not be supported here.
from discord.js.
@LaiBaoYuan Hi, it looks like you have solved the proxy problem? I cannot even log my bot in, but I'm pretty sure that my proxy server is working well, it seems like the proxy does not work well with discord.js. Can you tell me how do you deal with it? Many thanks.
const { Client, Events, GatewayIntentBits} = require('discord.js');
const { token } = require('../config.json');
const { ProxyAgent } = require('undici');
const client = new Client({
intents: [GatewayIntentBits.Guilds],
rest: {
agent: new ProxyAgent('http://127.0.0.1:1080'),
},
});
client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
client.login(token);
$ node production/index.js
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a
promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Node.js v18.16.0
from discord.js.
@LaiBaoYuan Hi, it looks like you have solved the proxy problem? I cannot even log my bot in, but I'm pretty sure that my proxy server is working well, it seems like the proxy does not work well with discord.js. Can you tell me how do you deal with it? Many thanks.
const { Client, Events, GatewayIntentBits} = require('discord.js'); const { token } = require('../config.json'); const { ProxyAgent } = require('undici'); const client = new Client({ intents: [GatewayIntentBits.Guilds], rest: { agent: new ProxyAgent('http://127.0.0.1:1080'), }, }); client.once(Events.ClientReady, c => { console.log(`Ready! Logged in as ${c.user.tag}`); }); client.login(token);$ node production/index.js node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */); ^ [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] { code: 'ERR_UNHANDLED_REJECTION' } Node.js v18.16.0
you can append the catch in the login to see the error detail, I'm not ensure that you have a network problem unless you can show your error detail rather than error without catch
.
from discord.js.
Related Issues (20)
- addChoices in RoleSelectMenuBuilder or in addRoleOption (SlashCommandRoleOption) HOT 1
- Redis ReplyError when pulling with xreadgroup on empty subscribed events HOT 2
- Add `reason` to follow announcement channel endpoint
- Have event handler callbacks support both async/sync methods HOT 3
- No definition found for the 'commands' property HOT 1
- Ambiguous event names: LinkTags and Anchors
- Only messages are allowed to create polls HOT 1
- Merged interfaces from package overview 404.
- Inaccurate typings for GuildMember#partial
- `Message#fetchReference()` returns a non-message on certain message types
- @discordjs/voice not working with Bun HOT 1
- fix MessagePayload.js to send voice message
- TypeError in GuildDeleteAction.handle when Destroying Voice Adapter HOT 13
- Bot send embed messages twice or even triple times after being not used for a while HOT 15
- Raw audio stream with AudioPlayer HOT 2
- [SlashCommandStringOptions] Be able to pass arguments to the constructor, or more builder options for SlashCommandStringOption HOT 2
- Publish a new release (dev build points to /ws that doesn't include a fix) HOT 3
- ClientPresenceStatusData Canary and PTB HOT 1
- ActionRowBuilder Constructor improperly merging provided components into new componentbuilders HOT 4
- Client is not receiving 'messageCreate' events HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord.js.