discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Slash commands not showing up for users in a particular server.

Open japandotorg opened this issue 1 year ago • 0 comments

Description

Hello, I am currently facing an issue where global slash commands for my bot (with ID 808706062013825036) are not appearing for some users in a particular server (with ID 351064956478685184). Below is the minimum code I am using to create the global slash command, and I can confirm that this command (/slashtest) does appear for all members in other servers, but only appears for one member in this particular server. I have confirmed that all users have the use_application_commands permission bit, and that the integration settings for my bot are not restricting this command in any way in that server.

import aiohttp
import json
url = f"https://discord.com/api/v10/applications/{bot.user.id}/commands"
payload = {"name": "slashtest","type":1, "description": "testing"}
payload = json.dumps(payload)
headers={'User-Agent': bot.http.user_agent}
headers['Authorization'] = 'Bot ' + bot.http.token
headers['Content-Type'] = 'application/json'
async with aiohttp.ClientSession() as session:
  async with session.post(url, data=payload, headers=headers) as response:
    return await response.text()

Payload

Steps to Reproduce

No steps known.

Expected Behavior

Slash commands are supposed to show up.

Current Behavior

Slash commands are only showing up for a single user and they're just a mod. Even the owner of the server is not able to see them, neither can I.

Screenshots/Videos

No response

Client and System Information

Browser - All clients and web. Library - Discord.py

japandotorg avatar Jul 28 '22 08:07 japandotorg