Comments (8)
I have seen on this Documentation https://discordjs.guide/interactions/registering-slash-commands.html#guild-commands, but did Discord Akairo already implement this?
from discord-akairo.
make sure u have the GUILD_INTEGRATIONS
intent
from discord-akairo.
I have the GUILD_INTEGRATIONS
from discord-akairo.
public constructor(config: BotOptions) {
super(
{
ownerID: config.owners,
},
{
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_INTEGRATIONS,
],
}
);
this.config = config;
}
from discord-akairo.
Hi, sorry to pop in on an unrelated subject, but how did you use esm imports? I am getting an error when I try to do that.
https://i.imgur.com/HcsrsUC.jpeg
from discord-akairo.
public constructor(config: BotOptions) { super( { ownerID: config.owners, }, { intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_INTEGRATIONS, ], } ); this.config = config; }
I'm not sure, it should be working, u might have to try and do some debugging to see if u can figure out what is happening
from discord-akairo.
Hi, sorry to pop in on an unrelated subject, but how did you use esm imports? I am getting an error when I try to do that.
they are using typescript, for javascript you would have to google it
i know babel or swc can be used but looking at the node docs (https://nodejs.org/api/esm.html) it looks like u can use the .mjs
file extension to ue them
from discord-akairo.
The interactionCreate is not triggering, when I type
/ping
in discord. The other event likemessageCreate
works fine, anyone has a solution?import { Listener } from "discord-akairo"; import { Interaction, MessageActionRow, MessageButton } from "discord.js"; export default class interactionCreate extends Listener { public constructor() { super("interactionCreate", { emitter: "client", event: "interactionCreate", category: "client", }); } public async exec(interaction: Interaction) { if (!interaction.isCommand()) return; if (interaction.commandName === "ping") { const row = new MessageActionRow().addComponents( new MessageButton() .setCustomId("primary") .setLabel("Primary") .setStyle("PRIMARY") ); await interaction.reply({ content: "Pong!", components: [row] }); } } }
try changing import { Interaction, ... } from "discord.js"
to import { CommandInteraction, ... } from "discord.js"
see https://discord.js.org/#/docs/main/stable/class/CommandInteraction
from discord-akairo.
Related Issues (20)
- Suggestion: Drop node v12 for v14 in next major version
- Weird intents problem HOT 1
- On dootherwise... HOT 1
- discordjs v13 support
- Discord.JS V13 problem with Discord-Akairo HOT 2
- bot stops working after a few secs HOT 1
- ES6 ESM imports not working
- TypeError: this.client.setInterval is not a function HOT 4
- Improved Documentation on Emitted Events
- DM commands no longer work HOT 1
- Conditional Commands is not works.
- Cannot execute commands without basic intents HOT 2
- voiceStateUpdate event not triggering listener
- discord.js 13x support should come as soon as possible
- How do I ban a member who is not on the server, I select a member in args[] but can't find it. HOT 1
- Es Module
- Deprecation when updating commands that require bot to update a message
- Update docs/samples: disableMentions has been removed and replaced with allowedMentions
- Convert to twitch.tv
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-akairo.