question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

One Command Registers Only

See original GitHub issue

Which package is this bug report for?

discord.js

Issue description

First, create two (or more) command files, then try to deploy them (after adding all other necessary code and files), to a container hosting service, like Railway.app (where I am getting this error, have not tried anywhere else), You’ll see only one out of however many commands you registered will show up, without any errors, and in my case, it logs successfully registered commands.

Screenshot 2022-05-04 11 33 21 AM

server-info.js

const { SlashCommandBuilder } = require(`@discordjs/builders`);
const { MessageEmbed } = require(`discord.js`);

module.exports = {
  data: new SlashCommandBuilder()
    .setName(`server`)
    .setDescription(`Display info about this server!`),
  async execute(interaction) {
    const serverInfo = new MessageEmbed()
      .setColor(`BLACK`)
      .setTitle(`**Server Info**`)
      .addFields(
        { name: `Server name:`, value: `${interaction.guild.name}`, inline: true },
        { name: `Total members:`, value: `${interaction.guild.memberCount}`, inline: true },
      )
      .setThumbnail(interaction.guild.iconURL())
      .setFooter(`Bot Creator: BatemaDevelopment#0019 | BatemaDevelopment | Lukas Batema`)
      .setTimestamp();

    interaction.reply({ embeds: [serverInfo] });
  },
};

user-info.js

const { SlashCommandBuilder } = require(`@discordjs/builders`);
const { MessageEmbed } = require(`discord.js`);

module.exports = {
  data: new SlashCommandBuilder()
    .setName(`user`)
    .setDescription(`Display info about yourself!`),
  async execute(interaction) {
    const userInfo = new MessageEmbed()
      .setColor(`BLACK`)
      .setTitle(`**User Info**`)
      .addFields(
        { name: `Your username:`, value: `${interaction.user.tag}`, inline: true },
        { name: `Your ID:`, value: `${interaction.user.id}`, inline: true },
      )
      .setThumbnail(interaction.user.displayAvatarURL())
      .setFooter(`Bot Creator: BatemaDevelopment#0019 | BatemaDevelopment | Lukas Batema`)
      .setTimestamp();

    interaction.reply({ embeds: [userInfo] });
  },
};

Code sample

No response

Package version

v13.6.0

Node.js version

v16.14.2

Operating system

Dockerised Alpine 3.15

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

User, Channel, Message

Which gateway intents are you subscribing to?

Guilds, GuildMembers, GuildBans, GuildEmojisAndStickers, GuildIntegrations, GuildWebhooks, GuildInvites, GuildVoiceStates, GuildPresences, GuildMessages, GuildMessageReactions, GuildMessageTyping, DirectMessages, DirectMessageReactions, DirectMessageTyping, GuildScheduledEvents

I have tested this issue on a development release

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
Lukas-Batemacommented, May 4, 2022

bruh, this is the first time I got this bug

2reactions
AimFlyingcommented, May 4, 2022

Hi ! This is not a discord.js issue, but a Discord issue. I already reported it and it will be fixed soon ^-^ We have this bug since the new Applications Commands Goodbye !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discord bot only registers first one slash command
I'm trying to upgrade one of my bots to use the new slash commands featured in Discord.js v13. I have done some research...
Read more >
Vim registers: The basics and beyond - Brian Storti
You can use the :reg command to see all the registers and their content, or filter just the ones that you are interested...
Read more >
GDB Command Reference - info registers command
The info registers command displays the contents of general-purpose ... the info registers command will show the contents of a given register only....
Read more >
A Programming Language With Only One Command and the ...
OISCs (pronounced “whisks”) have commands that effectively combine some form of flow control, branching, and data manipulation. Often this happens by ...
Read more >
How do I search the contents of registers?
"Unnamed" register is not a real one. It's just a pointer. When you delete the text that has ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found