Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons aren't shown when command is executed on mobile, but are when executed on pc. #9689

Closed
Vigintillionn opened this issue Jul 9, 2023 · 1 comment

Comments

@Vigintillionn
Copy link

Vigintillionn commented Jul 9, 2023

Which package is this bug report for?

discord.js

Issue description

Issue

While developing my Discord bot using Discord.js, I encountered a peculiar issue related to sending message buttons on mobile devices. When I use a command that includes only content and message buttons (without an embed), the buttons are not sent on mobile devices. This problem occurs exclusively on my production bot, which has an approximate ping of 20ms. However, I was unable to reproduce the issue when running the bot on my local machine, which has a ping of around 150ms.

Steps to Reproduce:

  1. Make the bot send a message that contains ONLY content and message buttons (not tested with other components).
  2. Run the command on a PC.
  3. Run the command on a mobile device.

Expected Behavior:

The bot should reply with both the content and the message buttons on both PC and mobile devices.

Actual Behavior:

The bot correctly sends the content and buttons when the command is executed on a PC. However, when the same command is executed on a mobile de
/vice, only the content is displayed, and the buttons are missing.

Additional Information:

  • The issue occurs specifically on my production bot with a low ping (around 20ms).
  • The problem could not be reproduced on my local machine, which has a higher ping (approximately 150ms).
  • I have only tested this behavior with message buttons and not with other types of components.

Code sample

client.on("interactionCreate", (interaction) => {
  if (!interaction.isChatInputCommand() || interaction.commandName !== "test") return;
  interaction.reply({
    content: "This is a test message",
    components: [
        new MessageActionRow()
        .addComponents(
             new MessageButton()
             .setCustomId("test")
             .setLabel("test")
             .setStyle("PRIMARY")
        )
    ]
  });
});

Screenshots

  • On pc
    image
  • On mobile
    image

Versions

  • discord.js 13.16.0
  • nodejs v18.12.1

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response

@Jiralite
Copy link
Member

Jiralite commented Jul 9, 2023

You are describing a Discord issue, which you are in the wrong place for. This is discord.js—an API wrapper.

However, I was unable to reproduce the issue when running the bot on my local machine, which has a ping of around 150ms.

This sounds a lot like you're at fault here. For example, it could mean your production bot isn't doing what you expect (obviously).

Either way, this isn't the right place to report such an issue. You can report API issues to https://github.com/discord/discord-api-docs.

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants