#github-notifications

1 messages · Page 37 of 1

chilly siloBOT
#

Description

As of recently the bot invites that request the REQUEST_TO_SPEAK (1 << 32) permission return an Invalid permission(s) provided error.

Steps to Reproduce

  1. Acquire bot invite
  2. Provide 4294967296 (just the REQUEST_TO_SPEAK permission)
  3. Receive error
  4. Provide different permission, e.g. 2147483648 (just the USE_APPLICATION_COMMANDS permission)
  5. Receive no error

Expected Behavior

REQUEST_TO_SPEAK is considered a valid permission with no error...

chilly siloBOT
#

Hey everyone,

Last summer, we shared a big announcement: on April 31, 2022, Message Content would become a Privileged Intent.

This change was for only verified apps, and it meant that over the following nine months, developers would need to migrate to our new best practices on commands (i.e. use Slash Commands, or request and be approved for the Message Intent). This was and still is a significant change for many of you, and one you’ve told us you were anxious about. With that in m...

chilly siloBOT
#

Description

If you have an interaction with buttons and a select menu, and you click a button, while all the buttons will be in a disabled state, the dropdown can still be opened, modified, and submitted.

I've encountered some race condition-y things because of this unexpected behaviour.

Steps to Reproduce

  1. Create a message with at least one button component and one select component.
  2. Click on a button. The buttons should all be in a disabled state while waiting for the int...
chilly siloBOT
#

Description

Slash command arguments with autocompletion set are broken in a couple of ways:

  1. If you type anything in them they often get stuck loading forever. This can be "fixed" by backspacing back to being empty. They sometimes work after a very long delay (10+ seconds)
  2. The iOS client sends an autocomplete request to the bot every 500ms no matter what while in the autocomplete field. This happens when the field is empty as well as when it is partially filled

Steps to Rep...

chilly siloBOT
#

Description

If you attempt to execute a webhook / patch a webhook message and have an invalid payload_json (for instance you dropped a quote) the API doesn't reject the message but attempts to send it anyways (if you attach a file too it will send just the file)

Steps to Reproduce

  1. Grab a webhook
  2. Attempt to POST to it with form data, and an invalid payload_json ({ "content": hi" }) (same steps apply for PATCH)
  3. Optionally attach a file
  4. Observe

Expected Behav...

chilly siloBOT
#

Description

A recent hidden change in API behavior has led to the flags field no longer being sent with the user object. From my understanding, the flags field is for OAuth, while not explicitly stated on the docs.

An expected solution is to either update docs detailing when the field will be sent, or start providing the flags field again.

Steps to Reproduce

BOT_TOKEN= curl -H "Authorization: Bot $BOT_TOKEN" https://discord.com/api/v10/users/735620710948405248

...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When looking at the formatting reference for message, I noticed that there seemed to be a difference between mentioning users with an exclamation mark () and without the exclamation mark (), where mentioning a user without the exclamation mark seemed like it would display the username and not the guild member's nickname. This is not the case, and both give the same result, hence the description is misleading.

Steps to Reproduce

https://discord.com/developers/docs/refere...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

"Default" just means that version will be chosen when you don't explicitly specify a version in your URLs. The default version does and will change. They actually initially planned to disable v6 and v7 at the end of this month. Ideally, you should always use the latest version documented, and regularly update your code to reflect new and decommissioned API versions.

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

As of about 2 days ago, I started having issues registering commands with one particular guild, ID 349243932447604736 (the only guild my bot registers commands in). Not sure if it's related but this is a partnered server, maybe a new feature got rolled out to it early and that's causing this.

The issue is: when registering my commands, at first the bot will get ratelimited for about 55 seconds: (m:'http', l:469) We are being rate limited. Retrying in 51.08 seconds.. Pl...

chilly siloBOT
chilly siloBOT
#

When a user is updated (eg. username or avatar), a GUILD_MEMBER_UPDATE is dispatched, as said by the docs.

However, the docs also indicate that a PRESENCE_UPDATE is triggered, which doesn't seem to be the case anymore.
I've updated the description of PRESENCE_UPDATE to remove this information.

Additionally, I clarified that the USER_UPDATE event is dispatched only for updates to the current bot's user (this event isn't fired when other users are updated).

chilly siloBOT
#

We should have a way to confirm an interaction with webhooks

Example: Using "systems" to talk with other members using webhooks for different "users" for example, poeple with dissociative disorder
Or in other cases for roleplaying

The interaction would be confirmed using a webhook request, It's annoying to need to manually dismiss an ephemeral interaction or using a non-ephemeral interaction, due to network fluctuation, some people may see the bot reply to the interaction before it get...

chilly siloBOT
chilly siloBOT
#

Description

If I have a select with:
— A
— B
— C
In which I first select B, then A, then C, in the client it'll show A, B, C (aka the order in which they appear in the dropdown) as the selected options in that order, yet my bot receives B, A, C
I find this to be unclear for the user to the point where it confused even me, the developer of the bot

Steps to Reproduce

— Create a multi-option select along with a functional bot that just receives and logs the order in which the bot...

chilly siloBOT
#

It would be a neat idea to have input components for modals that only accept numbers as input.

image

Possible solutions

  1. Have a new text input component type that would accept only numbers as input and would ignore non-numeric character input (similar to INTEGER [Application Command Option Type](https://discord.com/developers/docs/interactions/application-commands#applicatio...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When setting bot permissions the button for saving doesn't appear and when attempting to change something else with it and saving it the bot permissions won't save.

Steps to Reproduce

I honestly have no idea why it happens, but i guess it's because the bot permissions part isn't set to be saveable like others but instead it's like changing in-between the pages. I don't even know if I'm not just speaking nonsense, I'm not good at this.

Expected Behavior

"Save chan...

chilly siloBOT
chilly siloBOT
#

I spent a good number of hours trying to figure out why my access_token request wasn't working.... and I'm sure there are plenty of others who are encountering this issue.

I only figured it out because of this person's answer on StackOverflow: https://stackoverflow.com/a/70280164/12894626

I know this can be said that I made a noob mistake, but PLEASE explicitly state that the auth redirect_uri needs to be the same as the token redirect_uri otherwise it won't work!

Otherwise, people a...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I'll upload them in a second

On Mon, 4 Apr 2022, 13:34 Lala Sabathil, @.***> wrote:

cough https://github.com/discord/discord-api-docs/tree/main/images
there are the images. Don't use cdn links.


Reply to this email directly, view it on GitHub
https://github.com/discord/discord-api-docs/pull/4751#issuecomment-1087498534,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARHKMFKRIDYT3RTKY4OVUHDVDLOWHANCNFSM5SPIUFPA
.
You are receiving this becau...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I would've said something like "one of your", because you can have multiple urls saved in the dev portal.

@Lulalaby I wouldn't put this in because the discussion I referenced shows the redirect_uri has to be a specific one

This is technically inaccurate. It is the redirect URI associated with an authorization. If the redirect URI is not specified during the authorization request, it uses the first URL registered for the application. In the token exchange, specifying the redirect...

chilly siloBOT
#

@night Could we get a response on this point?

I'm wondering why this shouldn't be documented. It's a cleaner way to check the type of invite than checking if guild is null, and is less susceptible to break if another invite type is introduced in the future.

If Discord has a reason for not wanting us to use it, I'd prefer to know it :smiley:
I'm probably not the only one tempted to use it when seeing this field.

chilly siloBOT
#

Description

Example of a access token response:

{"access_token":"HIDDEN","expires_in":604800,"refresh_token":"HIDDEN","scope":"identify guilds.join email","token_type":"Bearer","expireTimestamp":1649716649003,"iat":1649111859}

Also if possible can someone tell me what's iat?

Steps to Reproduce

Generate a access token response:
https://discord.com/developers/docs/topics/oauth2

Expected Behavior

To be the something different and not always 604800 ?

Curre...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

It seems the api part has been already created by the discord team. But it is user scoped only, thus making it impossible for bots to view this non-personal data.
(/api/oauth2/authorize?client_id=${bot.id}&scope=bot)
If and only if discord could make this available to everyone...
This endpoint also provides additional bot information such as tags, description too.
But it also provides all the guilds the user is in, in the response, so discord team please don't add the guilds array for b...

chilly siloBOT
chilly siloBOT
#

To preface this discussion/request, please consider this request from the perspective of a bot that does not connect to the gateway, and thus does not have a persistent and always-up-to-date cache of all of the guilds, channels, etc it is in.

Description
An endpoint for getting resolved permissions, such as GET /channels/{channel.id}/permissions/ that would return an array of resolved permissions for the provided channel (or guild) for the self user, similar to how the `permission...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Hello 👋

Problem: Users try to use certain commands but don't realize they lack the necessary permissions to do it or that the bot lacks the permissions to do it.

Request:

{
  invoker_permissions: "8",
  bot_permissions: "4",
  bot_channel_permissions: {
    "1234 channel id": "280640",
  }
}
  • The user(invoker) of the command needs x permissions to use the command.
  • The bot requires Y permissions to use the command.
  • The bot requires z permissions on...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

It seems that if a guild has more than 50 integrations some will be "hidden", the /integrations endpoint will only return 50, resulting in not only missing integrations from the UI in the client, but the integrations that arnt lucky enough to make it part of the 50, cannot use perms which they gain through their integration roles

Steps to Reproduce

Add 51 bots to a server each with roles
Find the 1 bot that doesnt get listed on the integrations page/endpoint
Attempt t...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Deferring is not always an option though. My bot uses a cloud function to lookup some data. If the lookup is successful, the bot responds with the data.

If the user searches for something that returns an error, then I want the bot to respond with an ephemeral message telling the user their lookup parameter was invalid. But if the lookup takes more than three seconds, it causes the bot to crash.

I can't use defer because I don't want the server to get spammed with, "Invalid search param...

chilly siloBOT
#

Description

Title describes it well.

Steps to Reproduce

Use https://discord.com/api/v9/users/{user.id}/profile?with_mutual_guilds=false&guild_id={guild.id}

Expected Behavior

User object is reported either within the user property, or guild_member.user property.

Current Behavior

User object is reported both within the user property, and guild_member.user property.

Screenshots/Videos

No response

Client and System Information

Reproducible with any c...

chilly siloBOT
chilly siloBOT
#

It's generally speaking always a problem to verify someone's age.
I mean... The fact that you should be 13 or older to even make a Discord account is not stopping minors from creating one. After all is the only thing stopping them an "I agree to the Terms of Service and Privacy Policy" checkbox and maybe a captcha, but that's pretty much it.

The same applies to 18+ stuff. People can just fake their age on the internet. It's a sad problem existing since the birth of the internet itself and...

#

Well the concern here was that underage devs shouldn't have access to creating/marking NSFW commands, which can be mitigated with a verification system using official docs like the bot verification system. There's still ways around it, but it'd be one way to fix that concern, which was the point I was trying to make- it's pretty hard to fake your age when you need to show official docs to verify it. Not marking NSFW commands properly would also be an issue come verification time, if not an ...

chilly siloBOT
chilly siloBOT
#

Description

I think the ON_MEMBER_UPDATE event is handled slightly differently when a user sets their status to "invisible" manually rather than logging off. In some silly code I have, it appeared to fire twice. This allows for the possibility of determining whether someone is actually off-line or not, which I think is unintended.

Steps to Reproduce

  1. Have a bot listen for the ON_MEMBER_UPDATE event
  2. Make it perform an action when a member goes off-line, such as creating ...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

I'm following the instructions to make a bot. I have made an app. When trying to add a bot, I see the following error in the UI: Username cannot contain "discord" (username)

This is a separate error from the error I see in the POST request to https://discord.com/api/v9/applications/APPLICATION_ID/bot. This error says that the request was malformed. The request just sent empty brackets in JSON. {}

Steps to Repr...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

The word "shifumi" which is a short for "rock paper scissors" in France, is counted as a bad word for the application directory.

Steps to Reproduce

  • Create a slash command named "shifumi"
  • Go in the "discovery status" page of the App Directory
  • You see there is a cross at the "Your commands may not contain any harmful or bad language" line.

  • Go in the "Product page" of the App Discovery
  • Add "shifumi" in the long description
  • You see there is a cross at ...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When editing a message in a thread that thats a role or multiple roles that combined tag > 100 people, discord api times out and returns internal server error 500.

Is there any chance this can be loosened or changed to return its own error message at least. Now I have to edit the message multiple times to get to the same result either way.

Steps to Reproduce

Bot posts a message in a thread
Edit message to contain any role or multiple roles that combine to > 100 user...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

This list was compiled by myself as my bot received VOICE_SERVER_UPDATE packets on top of results from list voice regions endpoint. Some regions may be deprecated, not be included in this list, or have invalid names (as I literally cannot tell since not all are from list voice regions and as such, no way to receive real names). However, it is my firm belief that these should be documented similar to how Locales were just recently documented.

I can and will update my list as requested.

chilly siloBOT
#

The current behavior for both users and bots is that when they join a voice channel, the region they are connecting to will either be the region the first connected user is in or, in some cases as I have been told, an automatically adjusted region which is somewhere in between all connected users. This works great for users, but bots are a different story as they are not constrained to 1 machine or region.

I believe it would be beneficial for users if bots could hint to the api/gateway wha...

chilly siloBOT
chilly siloBOT
#

Description

I have 4 bots created, all of them are currently in 1 server, got created the same day and all have only the limited message intent turned on (Flags 524288).

When making this request:
curl -H "Authorization: Bot ****" https://discord.com/api/v10/channels/963224728607272990/messages/963226571777380393
once with every bot token, 2 bots get the message content in the response, while the other 2 get an empty message content field.

Even weirder is that when I replace t...

chilly siloBOT
chilly siloBOT
#

Description

When calling Create Message (POST /channels/:channel_id/messages) with malformed data from incorrect encoding of attachments, the server returns 500 Internal Server Error instead of a 400 Bad Request response with the corresponding error.

Steps to Reproduce

  • send a request to the endpoint with the following data:
----------------------------040047503040194731759086
Content-Disposition: form-data; name="files[0]"; filename="ping.json"
Content-Type: image/png...
chilly siloBOT
chilly siloBOT
#

Do you have the list of application ids exhibiting this behavior? The only identifiers provided have all been deleted.

Message I'm trying to fetch:
[#963475828874834020 message](/guild/957370416068956210/channel/963475828874834020/)

Curl request:
curl -H "Authorization: Bot **" https://discord.com/api/v10/channels/963475828874834020/messages/963476012920881232

Bot IDs:
957370792553877525 -> not getting content
957370840163434516 -> not getting content
`95737090...

#

Thanks for the report. We are unable to reproduce any misbehavior with GUILD_MEMBER_UPDATE locally.

When changing from online to offline the server sends only a single PRESENCE_UPDATE for offline status. It is possible some bot in your server is updating the user's nickname or roles when their presence changes. You could examine the payload to see what changed specifically.

chilly siloBOT
#

@bchurton the issue in your payload is a form validation error. This is fixed already in production:

{"code": 50035, "errors": {"options": {"1": {"_errors": [{"code": "APPLICATION_COMMAND_OPTIONS_REQUIRED_INVALID", "message": "Required options must be placed before non-required options"}]}}}, "message": "Invalid Form Body"}

@SlimShadyIAm If this issue still occurs, is there a minimum viable repro for a new bot (rather than updating existing commands)? As in, is there a single ...

chilly siloBOT
#

At mobile it's possible to automatically stay in the autocomplete, even when a choice has been clicked. This can be used if the bot needs to suggest more options, like if we have a /docs command it could suggest the attributes of it for example.
I also don't think that both clients should behave different in this case, because it could limit developers when they have ideas of making autocompleted options.

My problem is that I don't get the choice before the user entered the command whe...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

It looks like the issue is resolved now.

cURL script:

curl -H "Authorization: Bot $DISCORD_TOKEN" \
-XPOST -F "files[0]={\"content\":\"pong\"}" -F "payload_json=@data.txt" \
https://discord.com/api/v10/channels/$CHANNEL_ID/messages

with data.txt being:

{"content":"pong","flags":0,"tts":false,"nonce":1649794889919,"embeds":null,"attachments":[{"options":{"data":"{ \"content\": \"pong\" }","name":"ping.json","description":"pong"},"name":"ping.json","data":{"type":"Buffe...
#

Whoops, that's wrong. Turns out I read the manpage wrong 😄.

Fixed reproduction script:

curl -H "Authorization: Bot $DISCORD_TOKEN" -i \
-XPOST -F "files[0]=@data.json" -F "payload_json=$(cat data.txt)" \
https://discord.com/api/v10/channels/$CHANNEL_ID/messages

data.txt is the same as before, data.json is just:

{
  "content": "pong"
}

and this all returns

{"message": "500: Internal Server Error", "code": 0}
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

If you send an ephemeral message that contains an embed with images (from external URLs) in it, then edit the message to remove the embed before those images have been fetched (proxy_url, width, and height set), the embed will re-appear on the message once those images have loaded and the media proxy urls have been added.

Steps to Reproduce

  • Create an interaction
  • Respond with an ephemeral message containing external url(s) for images (easiest to reproduce if you set...
chilly siloBOT
#

Hello 👋

Problem:

For example, if I wanted to make a feedback modal to request users send a bug report on a game and one of the questions in the modal was:

Original: What is your in-game player ID (found ingame on the bottom of Settings>General). This small but simple question is 80 characters and the max allowed is 45. That is almost 2x the allowed amount.
Attempt 2: Okay let's try and dumb down the question to make it less clear but hopefully most users can understand. `'In...

chilly siloBOT
chilly siloBOT
#

Description

When you defer a slash command and then send a followup, the SUPPRESS_EMBEDS flag is ignored for the followup message, resulting in embeds still being rendered. Additionally, deferring a slash command with the ephemeral flag and then sending a followup with the suppress embeds flag also doesn't suppress the embeds, only when both ephemeral and suppress embeds flags are provided.

Steps to Reproduce

  1. respond to a slash command with type 5 (`DEFERRED_CHANNEL_MESSAGE_...
chilly siloBOT
#

From the docs:

flags can be set to 64 to mark the message as ephemeral, except when it is the first followup message to a deferred Interactions Response. In that case, the flags field will be ignored, and the ephemerality of the message will be determined by the flags value in your original ACK.

Basically, you have to set flags when you're deferring the response, as it will be ...

chilly siloBOT
chilly siloBOT
#

IMO, the heading "Your Game With Discord" doesn't make sense. The original heading still makes sense because rich presence is displayed on Discord

Somehow I completely forgot rich presence was a thing 🙃.

Personally, I think it reads better as "with Discord" considering that Discord is used as an accompanying service by developers to further the experiences of their games.

To me, "on Discord" implies that your games can be "on" (inside of / accessible through) Discord.

chilly siloBOT
chilly siloBOT
#

I didn't say to make the response ephemeral. What I was referring to is that when you defer an interaction response, the flags field in the first followup message will be ignored, and you should set it on the original deferral instead. It's documented behavior.

yes, that's what I did. try it yourself. the followup had no flags at all, while the interaction callback had both flags.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#
u1o

Adding ability to send and edit progress bar when deferring a reply would be a nice way to tell the user that the process is still going and the bot is still working.

When sending a deferred reply or editing it, you should be able to specify ending timestamp and/or progress bar:

{
  "type": 5,
  "data": {
    "end_timestamp": 1650044987,
    "progress": 55.7
  }
}

This will look like this for the user:

![image](https://user-images.githubusercontent.com/43674123...

chilly siloBOT
chilly siloBOT
#

so im making a game on my bot that has 2 players that take turns, so i thought it'd be really neat if the button controls i use could like, be disabled for the other person while it's not their turn. Sort of like slash command permissions right now where if your user id doesn't match the one set in the commands permissions, it appears disabled for you and you can't use it.

chilly siloBOT
chilly siloBOT
#

Well, tested it out, now none of the bots can get any messages anymore except their own. Message content is turned on and has been toggled a few times as well in the past 10 minutes.

My curl requests
curl -H "Authorization: Bot **" https://discord.com/api/v10/channels/964658908268486677/messages/964658910021705758
only return content when the message is sent by the bot itself.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

tbh, why not just both? it could display a progress bar and the ETA

Ending timestamp can be used to improve UX performance - discord could tell the user that something went wrong if the bot hasn't changed the reply for more than 3 seconds after the ETA expires

that seems cool. also, maybe a custom color for the progress bar itself? if not completely custom, maybe the user status colors of online, dnd, idle, and offline/invi for done, error, idled/warning, and `no respo...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When i go to submit / enable my app discovery it mentions "Your application commands may not contain any harmful or bad language", even though my bots slash commands contain no harmful language, i have gone through every single command and disabled them and it still says the same thing, i even waited 24h to see if it needed to propegate but still no luck

Steps to Reproduce

N/A

Expected Behavior

Allow me to enable discovery

Current Behavior

![image](https://u...

chilly siloBOT
#

Description

If you have unread messages in a channel, using a slash command does not cause them to be marked as read.

I originally submitted this in the [Discord server](#963866435766059058 message) as an idea, but was told to submit here as a bug by @mason

Steps to Reproduce

Have unread messages in a channel and use any slash command

Expected Behavior

The unread messages get marked as read, just like if you ...

chilly siloBOT
chilly siloBOT
#

Description

Using the /msg slash command you are able to “send” DMs to the discord system

Steps to Reproduce

/msg user:643945264868098049 message: test

Expected Behavior

There is no expected behaviour currently

Current Behavior

It "sends" the message.

Screenshots/Videos

[Image]((https://gpus.yessar.xyz/me_system.png)

Client and System Information

App: 122.0 (31608) stable; Manifest: W/"0c6f58a95cb14d3d77948e11ab2453ee"; Build Override: N/A; Device: iPhone14,...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

Occurs only on applications belonging to a team.

Consistent across applications and users, seemingly appearing since yesterday, as indicated by reports on the Discord Developers Discord.

Steps to Reproduce

  1. Add any image to an application belonging to a team.
  2. Click "Save Changes".
  3. Loss.

Expected Behavior

Correctly uploading and saving the asset.

Current Behavior

"Unknown application" error.

Screenshots/Videos

![image](https://user-images.g...

#

Currently, there is very little latency control in Discord's voice channels. While this is usable in most settings, this does not work in the arts study groups and serious conferencing use cases. Also to mention, there are currently no server-side audio filtering that would allow moderating a voice channel for all of its users. If such filters existed, we could easily remove curse words, foreign language speech, or copyrighted content out of those voice chats.

I opened a single ticket for ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

A nice addition in parallel to Application Commands permission v2 would be the ability to completely disable a global command per guild.

Why is this needed?

I see a few cases where applications would want to control commands availability in a guild:

  • Premium commands: You may want to be able to hide these commands unless the guild has subscribed to a premium plan.
  • Multipurpose bots: These bots usually provide switches in their own dashboard to enable or disable a whole ...
chilly siloBOT
#

Description

The link to the Discord API Terms of Service on https://discord.com/developers/applications takes you to https://discord.com/developersundefined - a 404 Error Page

Steps to Reproduce

Expected Behavior

You should be taken to the Discord API Terms of Service

Current Behavior

You are taken to a 4...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I dont think its cause of my request body, As I told my command is exist in list of command

REQUEST: GET applications/{discordappId}/commands

RESPONSE:

....
[14]=>
array(9) {
["id"]=>
string(18) "965430679036887050"
["application_id"]=>
string(18) "862859203634003988"
["version"]=>
string(18) "965430679036887051"
["default_permission"]=>
bool(true)
["default_member_permissions"]=>
NULL
["type"]=>
int(2)
["name"]=>...

chilly siloBOT
#

I have a Slash Command Bot made as Serverless Function that responds to Slash Commad Requests through Interaction Endpoints.

Since it is implement like this, the Bot by It's nature doesn’t connect to anything.

Now I wanted to set status for my Bot or maybe change it frequently (as it would look cooler) but found out that it is not possible without connecting to gateway. (Uncool)

I suggest that the abillty to set a Bots Status should be available via the REST API also.

chilly siloBOT
#

There are lots of bots who are using user-defined stuff for like welcome messages or so. Most bots have custom variables users can take in like {member} for the member name who joined the guild. I'd like to have a list of possible format values in textinputs or command arguments.

For example, the bot will take a string like "Hello, I am {member} and I am {age} years old!", the possible Format Values can be shown up to the user with their label.
The user could give the bot a string li...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When running a slash command with commands v2 and only having the bot added with the applications.commands scope, the user becomes the bot.

Steps to Reproduce

  • Have commands v2
  • Add a bot with the applications.commands scope only
  • Run a slash command

Expected Behavior

The bot shows up as the author of the message.

Current Behavior

The user is the author of the message instead of the bot.

Screenshots/Videos

![unknown](https://user-images.githubuser...

chilly siloBOT
#

Description

Clicking a select menu option and clicking it again won't send a second interaction.

Steps to Reproduce

  1. Click an option
  2. Wait for the bot to respond properly (without an error like "The application did not respond")
  3. Try to click the same option

Expected Behavior

There should be another interaction

Current Behavior

There is no new interaction and the only way to re-select it is to restart the client or to select another option first.

Screenshot...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I think this is necessary for slash commands and it worries me that something like this does not already exist today.

This would work better as a separate endpoint, so that defered interactions could also have error. I think
something along the lines of POST /interactions/{interaction.id}/{interaction.token}/error .

In general, I don't think ephemeral messages solve this problem because their formatting is chosen by the individual developer, and errors should all look the same so u...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

Sometimes, the choices an application returns for an autocomplete interaction can depend on the values of other options that the user may or may not have filled in. This works fine most of the time, but when the results for an option are cached and the value of a different option changes, the cached result is still used for the original option even though the application might have responded differently when the other option changed.

Steps to Reproduce

  1. Create a slash...
chilly siloBOT
#

discord could tell the user that something went wrong if the bot hasn't changed the reply for more than 3 seconds after the ETA expires

I think a good idea for a response message could be "This appears to be taking longer than usual..." or something of the sort from Discord's end. I think this would be better then just having it error the command as it gives the bot a chance to still respond if experiencing elevated latency or any other issues.

chilly siloBOT
chilly siloBOT
#

Description

The code example for file attachments has an incorrect file name.

Steps to Reproduce

https://discord.com/developers/docs/reference#editing-message-attachments-example-request-bodies-multipartformdata

Expected Behavior

"thumbnail": {
  "url": "attachment://file.png"
},

Current Behavior

"thumbnail": {
  "url": "attachment://myfilename.png"
},

Screenshots/Videos

No response

Client and System Information

N/A

chilly siloBOT
#

Description

When using a slash command from Android and selecting a choice from the list of autocompletion options the resulting value gets concatenated twice.
This behaviour seems to only happen when the value is the string representation of an UUID.
(tested with other values and these didn't have this behavior)

the choices payload send to discord

{
  "type": 8,
  "data": {
    "choices": [
      {
        "name": "Helck",
        "value": "10a4985d-0713-462e-a9d6-7...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When creating a message containing an attached file, it is not present in the message data returned by the create-call. Also not present when making a get-call for the message.

This creates issues when the message is later edited, when it's impossible to know if there are attachments or not.

Steps to Reproduce

  1. Create a message
  • Description: "Test1"
  • Embed: Image = "attachment://test.png"
  • Attachment: test.png
    (other values null)
  1. Get the message (using...
#

The real issue we're facing, is when editing the message.

  • Since Embed[0].Image.Url returned by the create/get-call is referencing Discord cdn, the attachment is no longer "hidden" and the image is hence displayed twice (once for the embed-image cdn-link, and one for the attached file)
  • The message data returned by the edit-call DOES contain the attachment

A work-around so far is, when editing a message, change the url from:
https://cdn.discordapp.com/attachments/123/123/test.png
to:...

chilly siloBOT
chilly siloBOT
#

Description

Ommitting entity_metadata when creating an External event, or when changing the entity type of an event to External, results in the resulting error being in an incorrect format.

Steps to Reproduce

Either:

  1. Create a Scheduled Event using the corresponding endpoint, setting entity_type to External, and omitting entity_metadata or setting it to null, or
  2. Modify an existing Scheduled Event that is not external, and set its entity_type to External (making sure ...
chilly siloBOT
chilly siloBOT
#

Forum channels are literally channels with direct link to Threads feature with an icon lol. Why don't the devs just test it out in beta and release it on stable version?

Pardon my ignorance of the development process but i am very sad that this isn't an available feature yet.

It's very useful for open source projects and communities. It just makes Discord more flexible and go to choice for many use cases.

chilly siloBOT
chilly siloBOT
#

Description

On android alpha, and on iOS when selecting a thread from the dropdown for a channel option the error "not a valid channel" is displayed.

This also happens regardless of channel_types being set, as long as one of the types is a thread.

I have not been able to test this on private threads.

Steps to Reproduce

Steps

  • Create (or use) a slash command with a channel option
  • Select that option
  • Select a thead from the dropdown (you may need to type to filter ...
chilly siloBOT
#

Interaction Data Structure:
https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure

The problem is for some Conmands you need to access Channel Name, Channel Type & Most importantly the Channel Permissions of the user. It would be better if such information is included in the Request so that Bots doesn’t need to make REST API calls again to fetch channel Information and / or store them for convenience and performance.

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Currently, the only way to access sticker.user and emoji.user is through REST requests to the respective endpoints. It would be greatly appreciated if this information could be included in gateway events as well, but not for messages of course.

Use-Case:

I want to dynamically keep a cache of stickers, and making the structures consistent between REST and Gateway would make things a lot simpler.

chilly siloBOT
chilly siloBOT
#

I'd take this a step further and say that messages posted as a response to interactions should be able to use all emojis like components can. This would make the expectation / behavior consistent within the ecosystem that is application commands.

Additionally, interactions already ignore most permissions (View Channel, Send Messages, Attach Files, and Embed Links to name some of the big ones), whether by design or side-effect, so it's odd that this is one of the few things that are...

chilly siloBOT
#

Given an application may receive multiple interactions per hour initiated from the same channel, this would cause serious inefficiency in communication. You should instead cache the channel metadata for a reasonable time.

You are basically encouraging bot developers to store data, the sole problem slash commands should be able to solve.
In many implementations that causes latency issues.
Like for me who uses Serverless Functions to host my Bot. Storing data would mean using a 3rd party...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When clicking on Jump to present, ephemeral message get's dismissed.

Steps to Reproduce

Send a message with a button which replies with an ephemeral message. Then send new messages so that the original message can't be seen without scrolling (Also it should show Jump to present button). Then go to that message and click on that button. You won't see any ephemeral message. Then click on Jump to present, you won't be able to see the ephemeral message.

Expected...

chilly siloBOT
#

Why is this feature needed

Many bots with voice capabilities currently use the following flow:

  1. A human joins a voice chat
  2. The human that joined the voice chat issues a bot-specific command to ask the bot to join the voice chat that the human user is also in
  3. Bot determines who invoked the command and the invoker's voice status
  4. Bot joins the voice channel of the invoking human

With user-specific channel invites, we would directly invite the bot to the desired VC, wi...

chilly siloBOT
#

Like in title, small change but I think it could help a lot.
Similar like in fields - you can decide whether it should be inline or not, it would help a lot having option to center title of our embeds.
It makes more sense when embed uses image, then those 2 would be perfectly aligned.

For now - many bots just uses custom white space characters to mimic spaces which sometimes works and sometime break entire message by rendering it in weird way... *(Not speaking of invisible characters in ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When i try to check any invite (e.g. this: https://discordapp.com/api/v6/invite/8reG7FdF) via v6 endpoint, i get the following response:
{"message": "500: Internal Server Error", "code": 0}

Steps to Reproduce

Type the following in browser: https://discordapp.com/api/v6/invite/8reG7FdF
and check the returned message:
{"message": "500: Internal Server Error", "code": 0}

This also works with https://discordapp.com/api/v6/invites/8reG7FdF

Expected Behavior

I ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#
Testing your websites' embeds on Discord is hard. Not only do you have to post your links somewhere to generate an embed, which might lead to premature leaking of unannounced projects, but you also have to deal with the caching Discord does. The following tool aims to mimic Discord's URL embedding system as closely as possible, in real time, so that web devs can test their Discord embeds easily before committing to a website deploy.
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I've encountered the same or very similar issue.

Have been unable to recreate the issue on a new server unfortunately.

Nothing had changed in my server but all commands that had permissions assigned suddenly stopped working (greyed out in the list).
The context menu commands with the same permissions still worked though.
(I verified all the commands had the correct permissions assigned with the API)

And a couple of days later, the permissions are now working on desktop as expecte...

chilly siloBOT
chilly siloBOT
#

i don't want to kick, or invite the bot as bot only
i want to invite the bot as bot and application commands

i made a slash command and now i remove all the codes and made a new code which makes my bot to just come online and nothing

// EXPRESS -------------------- STARTS
const express = require("express");
const app = express();

app.listen(3000, () => {
  console.log("Bot is running!")
});


app.get("/", (req, res) => {
  res.send ("Bot is online")
})
// EXPRESS --...
chilly siloBOT
chilly siloBOT
#

While not an explicit solution to client-side validation, I could also see augmenting https://github.com/discord/discord-api-docs/discussions/4615 with the ability to responding to a /error endpoint with custom_ids mapped to error strings of components. I see updating the modal with component-specific errors as a reasonable alternative to the idea of "communicate to the user what's acceptable input" and it also solves the problem of not being able to arbitrarily validate information.

I...

chilly siloBOT
#

It would be very nice if the per-user state of a select menu for messages persisted past refreshes/devices, as currently that state is not saved anywhere.

Example Use Case: Role selection menus.
image
I've had this select menu for a while, but now that I'm revisiting these types of interfaces, and trying to make a public bot to do these role menus, I've been thinking about this more....

chilly siloBOT
chilly siloBOT
#

Description

If you have a select menu open in the client and after some time it gets disabled the select menu stays and there is no way to close it, I tried pressing the Esc key or clicking outside of it but nothings work, the only thing you can do is to move to other channel, also you can't use the chat box when this happens and if you scroll up and then press the chat box the client turns black and you can only see the options from the select menu, very weird.

Steps to Reproduce

...

chilly siloBOT
chilly siloBOT
#

Although documented, this hasn't been launched yet. This issue is to track the launch of this.
Bot Rate Limits are as follows:

  1. A global 50/10 rate limit (meaning, this is the maximum # of messages a bot can send currently across all of discord).
  2. A 5/5 per server rate limit.
  3. A 5/5 global DM rate limit.

The rate limit applies to message creation and editing.
If your bot is big enough and is hitting the global rate limit legitimately, reach ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Hey all—

Today the new Command Permissions system (has been called permissions v2) has been rolled out to new users—though the UI changes are currently only on desktop. You should see the update when you refresh your client. This launch introduces quite a few changes which can be viewed in the docs PR and [changelog entry](https://github.com/discord/discord-api-docs/pull/4830/files#diff-39e6aeaafba5726f3fb409da21a6953dfb679480f09038...

chilly siloBOT
#

These channels could be created only by people with developer license
Discord is place for communites, and there are many developers on discord, i would like to suggest channels that could be useful
for developers

Github channel:
Channel that embeds your github page, i don't think i need to explain this one

Database channel:
Basically embeded mysql database, this could be useful for developers and game server managers

Forum channels ? like guilded has, they copied discord, its t...

#

Github channel

You can just use GitHub webhooks. Just append /github to the end of the webhook URL.

Database channel

No, just no. You should not be using Discord as a datastore. There's a thousand and one reasons for it, notably that it would have abysmal performance. Not too mention that it is terribly insecure as a datastore because Discord can read everything written to the channel. Just use a prope...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

This is really unacceptable. You have API versions. You should be making use of them for breaking changes. Pushing breaking changes to the current API version and telling no one about them is completely unacceptable.

Steps to Reproduce

Have a bot on Discord

Expected Behavior

Breaking changes should be pushed to new API versions; not the currently running API version.

Current Behavior

Breaking changes are constantly pushed to the currently running AP...

chilly siloBOT
chilly siloBOT
#

Is there a way to enforce certain immutable permissions in default_member_permissions for example?

Because it seems that commands, for example, a ban command could still be enabled for users without the BAN_MEMBERS bitwise permission field in a manual overwrite, a potentially dangerous thing to do.

To prevent this we could do backend permission checks, however, it almost defeats the point of frontend integration with Permissions v2.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I was told that months ago that Discord will add a way to select which bots we want to show their slash commands, and effectively manage more than 50 bots.
Since I understand the reason behind the limit of having only 50 bots max, it would be a good way if we can change active bots that can show their slash commands.
This will help server managers who got more than 50 bots manage which bot they want to use for the time being, instead of kicking and adding bots everytime.

chilly siloBOT
#

You know...for the moderation stuff...
The examples you stated contain three different kind of filters: bad words, foreign languages and copyrighted content.
Each of them requires a different model for an AI to process it.

Bad words = NLP model for the specific language, bad words database and intent detection
Foreign languages = model to detect the language, someone is speaking
Copyrighted content = model trained with all copyrighted righted content

Something like this is so expens...

chilly siloBOT
#

Description

When using the PUT /applications/{application.id}/guilds/{guilds.id}/commands route to bulk edit guild commands, the default_member_permissions field is dropped from all commands regardless of the value (at least from my testing, i.e. "0" or String(1 << 5)) and becomes null.

Steps to Reproduce

PUT /applications/{application.id}/guilds/{guilds.id}/commands with a body of

[
  {
    "name": "test",
    "description": "testtttttttttt",
    "default_m...
#

Description

It seems like the new backend prevents normal messages starting with a slash to be sent even when there's no exact match. I don't defend message commands but users still use them (and bots haven't fully migrated), and thus this is an issue. If people decided to set / as the bot's prefix, then they can't use text commands without the screen shaking and the need to prepend a space before the slash.

Steps to Reproduce

  • Be on a server with backend v2 (if you see a loadin...
chilly siloBOT
chilly siloBOT
#

I agree that the type of each field is a little redundant if it is the same as the structure. Maybe instead of removing all the audit log change keys, the ‘Type’ column could be removed, with a note explaining that the type of the keys is the same as that of the structure.

Alternatively, maybe something like this could work:

Structure Keys
guild afk_channel_id, afk_timeout, banner_hash, default_message_notifications, …, name…
channel name, nsfw, topic …
#

Github channel

You can just use GitHub webhooks. Just append /github to the end of the webhook URL.

Database channel

No, just no. You should not be using Discord as a datastore. There's a thousand and one reasons for it, notably that it would have abysmal performance. Not too mention that it is terribly insecure as a datastore because Discord can read everything written to the channel. Just use a prope...

#

I agree that the type of each field is a little redundant if it is the same as the structure. Maybe instead of removing all the audit log change keys, just the ‘Type’ column could be removed, with a note explaining that the type of the keys is the same as that of the structure.

Alternatively, maybe something like this could work:

Structure Keys
guild afk_channel_id, afk_timeout, banner_hash, default_message_notifications, …, name…
channel name, ns...
chilly siloBOT
#

To "pin" some auto-updating information, or in this example cryptocurrency prices, developers have to "hack" the change nickname + status feature. It would be great if Discord gave us a native way to do this without having to create a new bot for each status message.

I'm envisioning an area in the top right above the user/bot list that allows to register a widget, give it an ID back to the developer, and then let that developer auto-update it.

<img width="247" alt="image" src="https://...

chilly siloBOT
chilly siloBOT
#

There are clear reasons for limits.
Channel name updates f.e. have gotten their limits changed from a few seconds to iirc 2 minutes BECAUSE of bots with "auto-updating" features (showing stats through channel names).

Also, to my knowledge is the repeated, automated performance of actions towards the Discord API a violation of their Developer ToS.

So for your own safety, don't have such features.

(Disclaimer: Any of this info could be outdated and/or wrong. I do not guarantee them to be acc...

#

Description

Instead of pushing breaking changes to the currently running API version, the version system that is already in place should be used for breaking changes. If you are making changes that alter the way an endpoint is interacted with or the existing values given from an endpoint's response in any shape or form, those changes should be made in a new API version. Additionally, those changes should be well documented in some sort of changelog. The way things are done currentl...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Payload to Discord

POST https://discord.com/api/v9/channels/[CHANNEL]/messages HTTP/1.1
Host: discord.com
User-Agent: [USERAGENT]
Authorization: Bot [TOKEN]
Content-Type: multipart/form-data; boundary="7634b1da-0944-4f30-857c-dc055242b9f5"
Content-Length: 31201

--7634b1da-0944-4f30-857c-dc055242b9f5
Content-Type: image/png
Content-Disposition: form-data; name="files[0]"; filename=bug1.png; filename*=utf-8''bug1.png

[BINARY DATA]

--7634b1da-0944-4f30-857c-dc055242b9f5...
#

Description

When creating a message with attachments where the filename starts with an underscore, it is trimmed by Discord.

Steps to Reproduce

Create a message having an attachment where the filename starts with an underscore. Link the file via embed image.

Expected Behavior

Filename should be the same as in the create message.

Current Behavior

Filename is trimmed from underscores.

Screenshots/Videos

No response

Client and System Information

Discord REST ...

#

Its been a problem since at least last year, #1340.

I was hoping for some sort of indication that your attachment is inside of the embed, maybe a flag inside the embed object or something. Currently I just send in attachments: [] on every message edit just incase there are any attachments. Can't trust the urls since you can give the embed a cdn.discordapp.com url and it'll come out the same way as your uploaded attachment.

#

Comment

In this example, not only is the underscore trimmed but also the embed image element is deleted.

Payload to Discord

POST https://discord.com/api/v9/channels/[CHANNEL]/messages HTTP/1.1
Host: discord.com
User-Agent: [USERAGENT]
Authorization: Bot [TOKEN]
Content-Type: multipart/form-data; boundary="e6e5b17e-0f73-4fd7-8a8e-5371a2f6b7bc"
Content-Length: 16224

--e6e5b17e-0f73-4fd7-8a8e-5371a2f6b7bc
Content-Type: image/png
Content-Disposition: form-data; name=...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

If there is an intent for Guild Members data, it makes no sense why this is not added.
Discord claims it to be for "security concerns" but the only concerning thing here is the intent you added does nothing to stop scrapers, but rather stopping legitimate bot developers.

And it would be nice if bots can detect certain phrases in the bio, for example:

ABOUT ME

I'm 10 years old

you get the idea.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

The problem with using ephemerals in their current form is a user must scroll to the bottom of the chat to read it, and reinvoke whatever they tried to run, possibly from the very start of the command chain. The modal and button examples above are inline responses, which appear on the modal or directly below the button. It would be great if we could have an inline response type for buttons which responds directly below the button or even an option for ephemerals to appear directly under the m...

chilly siloBOT
#

Practically preaching to the crowd here anyway.

A central place for documentation for confusing things like audit logs really helps, as audit log isnt the best thing for static typing and trying to typehint interpreted languages. You probably remember the backlash from previous docs table deletions and this is the same here. This PR is unnecessary in my eyes and just makes the docs more spread out over many pages (typed structures being in topics/gateway for example). Instead, the table ...

#

The change is only in a PR and wasn't merged before community feedback could be given—nothing was removed on the main branch or pushed to the live docs, and I think that remains a benefit of having opensource documentation.

In my mind, this feels like the best forum for feedback on docs since it gives everyone the context of the tangible changes a PR would have. If people have other ideas, I'm happy to hear them but I'd rather not add unnecessary process to making docs changes (for Disco...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Hi everyone,

Earlier this week, we rolled out the long-awaited Command Permissions v2. If you’re active in Discord Developers, you’ve seen the iteration of permissions over the course of several months, from wireframes and tech proposals to betas and sneak peeks. (If you’re not, the first you heard about this new feature may have been Wednesday’s announcement.)

We’ve been working with many of you over those several months to make a great new syst...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

Setting default_member_permissions on command creation with the bulk endpoint prevents all users from using the command until it is edited by the application

Steps to Reproduce

  • have admin or be owner
  • Create a command with the bulk endpoint. It is important that a command with this name did not already exist.
  • PUT https://discord.com/api/v10/applications/:id/guilds/:id/commands with `[{"type":1,"name":"hello","dm_permission":false,"default_member_permissions...
chilly siloBOT
#

Discord is working on a "Content Moderation" feature that helps you to moderate a specific, or all server chats. You can create a keyword filter and a filter with discord's own insult list. These are some "rules" that you can edit and create.

Currently, you can pick 2 possible responses if discord detected the specific keyword in a message: "Block Message" and "Send an alert". I think it would be pretty awesome if you could pick "Reply to Message" as a possible response. That would help as...

chilly siloBOT
#

Description

Not sure if this bug is categorized as an API Bug or a Slash Commands Bug.

It's only happening in a certain guild (ID: 752630786561409076, Invite: https://discord.gg/JS6BEkDEHx), but querying slash commands is giving an internal server error (500)

Steps to Reproduce

· Join the affected guild
· Head over to #commands or any other channel where you can use Application Commands
· Type / followed by any letters, e.g. /hel
· Obser...

chilly siloBOT
chilly siloBOT
#

@nmsturcke I would keep this issue open. Any reproducible 500 is a bug that needs to be fixed.
Asking devsnek to manually lookup which application is causing the error is not really a scalable solution :upside_down_face:

I believe a read repair could be implemented on the search endpoint to fix bugged commands (ex. by removing the extraneous options).

chilly siloBOT
chilly siloBOT
#

Description

I ran into an issue where registering slash commands for a single guild for some reason only registers 1 single command when my bot is supposed to be registering 15. I use the discord.js library using REST, which is used in the discord.js guide shown here.

Steps to Reproduce

Not too sure what the issue of this is, but there could be some caching issue with how the commands are being shown vis...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

With the sudden release of permissions v2, an important functionality of the Discord API has been removed. Bots are no longer able to manage permissions and must use the Oauth2 API in order to do so. There are multiple reasons why this brings unnecessary burdens and complexities to the end user and bot developer.

While Oauth2 permission managing could be useful for something like a bot's web panel, there are much more reasons a bot would manage its own command permissions outside of a web...

chilly siloBOT
#

The concerns about this were a bot would be able to change its own permissions without moderators knowing. (Ironically, the rollout of perms v2 made commands that were previously locked now available to everyone)

However, what about a guild-wide or per-app setting in server settings that allows bots to manage their own permissions? If this was floated around internally, why was it denied?

chilly siloBOT
#

I respect the feeling that a moderator would not want commands to have their permissions changed without them knowing if they have already made changes. You would have a very big problem if a ban command somehow became usable by everyone.

However, I also realise the friction that a staff member could have if they need to set up everything themselves, which is what the current model requires staff to do.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

So can we at least get a developer fix, then?

or will need to solve this on our own?

Can you at least give us a one quick way to fetch all commands, so we can find out which one is the invalid ones?

The developer of the bot who made the mistake has to fix it. Until then, no one in your server will be able to search for slash commands. (Or you can kick the bot that created the issue)

chilly siloBOT
chilly siloBOT
#

It hasn't even been clarified on how a command may be invalid in the first place

A command is invalid because it was created during a period of time when the API allowed slash commands to be created with several options, of which one was SUB_COMMAND or SUB_COMMAND_GROUP, and another option was any other type. This is no longer valid, which means this should not be able to reoccur.

An example payload to create said invalid commands is below.

{
    "type": 1,
    "name": "p...
#

That's a good point. The difference between the two is that bots can do those. However, they don't have to be granted that permission by default, and its the decision of the admins/moderators to give the bot permissions to modify roles or channels, or mention everyone.

However, managing slash command permissions is a bit of a different story. If bots could modify them like perms v1 this would mean that a moderator can not stop the developer from changing the commands, which is unlike th...

chilly siloBOT
#

a moderator can not stop the developer from changing the commands

Moderators still can't really stop the developer from changing their command permissions if the developer doesn't have the best of intents. Ultimately a level of trust with the developer of a bot is needed, the oauth step just removes a bit of that trust by adding a higher barrier (in one way or another) to breaching that trust.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

Commands with default_member_permissions show up in the command permissions menu as being enabled for @everyone, even though they are only enabled for certain permissions by default. Instead, they should show up correctly in the menu.

Steps to Reproduce

  1. Make a command with default_member_permissions
  2. Check the command at the integrations tab of the guild

Expected Behavior

It's shown up as disabled for @everyone and enabled for the roles that have the per...

chilly siloBOT
#

If bots could modify them like perms v1 this would mean that a moderator can not stop the developer from changing the commands, which is unlike the rest of the permissions system.

What a bot ultimately does with the command still is dependent on the bot developer. For example, I could send a ephemeral message saying something along the lines of "you do not have permission to use this command"

chilly siloBOT
#

Background information

Currently every bot can be invited with the ADMINISTRATOR within the permissions field when using an invite link or we can give the bot that permission manually in the server settings. People nowadays tend to just set permissions=8 because their bot needs to be able to, for example, ban someone due a command they have. However there is no need for such a bot to have the ADMINISTRATOR permission. One perfect example was Rythm, a music bot, that had its invite...

chilly siloBOT
#

Hence my proposal, if you have even read it, to make them like intents. There are bots that need the message content, but definitely not all need the administrator permission - and definitely not a music bot like Rythm.

But its not an intent, its a permission.
Intents allow bots to fetch certain data
Permissions allow bots to perform specific actions.

intents = data
permissions = tasks

#

Hence my proposal, if you have even read it, to make them like intents. There are bots that need the message content, but definitely not all need the administrator permission - and definitely not a music bot like Rythm.

But its not an intent, its a permission. Intents allow bots to fetch certain data Permissions allow bots to perform specific tasks.

intents = data permissions = tasks

What I meant with

like intents
is the process in having your bot being allowed to be ...

#

Might've been over exaggerated to completely prevent bots from having the permission. Hence I changed the proposal to lock them upon direct invite.
If required users are always free to give administrator permissions to the bot, just like they can on any user. This would at least prevent bots from requiring the administrator permission upon first invite.

#

Again, intents are for restricting access to data. Not permissions.

And the admin inviting the bot can choose what permission the bot gets before inviting the bot. The permissions the bot requests are just the recommended permissions set by the bot author. The admin inviting the bot can choose to disable the permissions or even change them in the the server after.

#

As said below, completely hindering the permission might've been over exaggerated.
Hence I changed the proposal to lock them upon invite to the server. There are lots and lots of people who just invite the bot without checking/removing the permissions it actually needs.

Server members would later be able to grant the permission to the bot, with the warning already within the description of the permission.

#

Ultimately the problem here is that neither bot developers or server admins are following the principle of least privilege. The reason for this is generally ease of use, which is usually the case made for not following that principle.

There are server admins that actually think about permissions (typically bot developers themselves in my experience) based on what they are using the bot for and what the bot needs to do that. They may even change the URL to put their own desired bitfield in ...

#

As said above, there are lots and lots of people who just invite the bot without checking/removing the permissions it actually needs. There are way too many bots being invited with this and only this permission.
Some people invite bots without knowing what permissions it should even have due to their lack of knowledge and experience, as they might be new to the platform.

chilly siloBOT
#

I think the main issue here is that bots couldn't really provide feedback on why a command failed if permissions were set up incorrectly since they might not be able to even see the command being run to begin with (since they didn't have access to the channel) or simply didn't have permissions to talk in the channel.

Once slash commands get enforced for verified bots through the message intent, this should (for the most part) be an issue of the past, since a bot will always be able to resp...

#

Totally agree, however I do believe that nowadays a basic bot that has a ban and mute command should not put the administrator permission on the invite URL.
Whereas for the privileged intents, I do know what they are and mean - I probably phrased it wrongly but my intention for the first proposal was the procedure that would be similar to privileged intents, not the background system in itself.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

The issue is discord requires bots to have permission beforehand before being able to add that said permission to certain roles. However, a random breaking change was pushed into oauth2 pages 2 months ago that made certain permissions completely inaccessible to bots. ADMINISTRATOR permissions are the only way you can bridge the gap caused by that change right now. If this proposal was set to stone, then there should also be a proposal for ways a bot can assign the restricted permissions to ...

chilly siloBOT
chilly siloBOT
#

Description

When editing channels, the UI and API enforce a max of 64000 bitrate for stage channels. However, when creating a stage channel, the API accepts bitrates up to 96000. This then makes the client error when editing it.

image

Steps to Reproduce

  1. Have a community server
  2. [Create a channel](https://discord.com/developers/docs/resources/guild#create-guild-channe...
chilly siloBOT
chilly siloBOT
#

I believe most people have summed it well to why this would be an inefficient solution. The problem at hand is that a server mod/admin/owner are going to invite the bot without the principle of least privilege, and lazily go about it. The Discord Moderator Academy goes over in detail how moderation teams should treat the permission.

At the end of the day, it's **who invites...

chilly siloBOT
chilly siloBOT
#

Issue

Testing a bot as it gets further to complete development, i.e. 30-40 commands maybe, means that you can only restart your bot approximately 6 or so times before you would hit the "200 daily" ratelimit for application command registration.

This occurs even when the commands are just being registered to a single guild. This ratelimit impedes the ability to be able to test, bugfix, and create code for the next 24 hours after hitting it.

Issue Beyond the Ratelimit

The ratelimi...

chilly siloBOT
#

Is there a better way to change user status (activity) than connecting to the websocket gateway and sending a opcode 3 presence update, and if there isn't, should there be? Adding API functionality to /users/ would be much appreciated. For example, what about a GET request to /users/@me/activity to get the current status (like in the gateway), or a PATCH request to change it the same way? I think it would be really ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I completely understand why this is like that, it makes sense that the user has control over the commands that happen in their server.

However, from the Developer's point of view it's very useful and a better way to deal with permissions to access Permissions v2 the same way as a user does.

As mentioned above, a possible solution could be creating a MANAGE_COMMANDS permission for the guild that the bot can request. If the bot is given that permission, it can only manage commands tha...

#

I agree that in an ideal world it should be up to the person who invites the bot, and that person knows all the implications of granting administrator to a bot. There are a lot of user's who will just click through, or assume that it required for the bot to function (when for most it is not).
For example roughly 30% of guilds my bot is in have granted it the administrator permission, (for context I do not request it, or have any features that require it). This is most likely because of a cul...

#

@nmsturcke

it makes sense that the user has control over the commands that happen in their server

Isn’t it best that the user has control over everything that happens in their server in that sense? Bots can create and manage webhooks, create and manage roles, create and manage channels.

I agree with your manage_commands permission, but I think a bot should be allowed to edit all commands. None of the actions I listed above are locked specifically to what a bot owns or created.

chilly siloBOT
#

The attachment slash input has been great thus far, but I've ran into a problem; if a user doesn't have the Attach Files permission in the channel they can't upload to the command, thus rendering it unusable if the attachment is a required argument.

While this makes sense at first glance, this behaviour is odd to me; the user isn't uploading directly to the channel, they're uploading the attachment for the bot to work with. And if the command is ephemeral, there's even its own `ephemer...

chilly siloBOT
#

Yes but the 200 limit is not a global ratelimit. It's for all registrations. I agree, a 200-per-day ratelimit is fine for global registration. But if as a developer I get locked out of registering commands on every application I own for 24 hours for hitting this ratelimit on accident, I have questions about how it works.

Again -- why does the limit exist at 200 for guild commands, considering based on sub and sub-sub commands you could theoretically have hundreds of commands? *Is it that...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

When seeing questions/screenshots that are often posted in dapi/ddevs, I believe a lot of inexperienced devs just check the ADMINISTRATOR permission in the developer portal's URL generator because it's easier, or just to be sure it will works.

A first step would be to remove it from the OAuth URL generator. Someone who wants to request the administrator permission would have to manually set it in the permissions query string. I'm pretty sure this change would decrease the number of new...

chilly siloBOT
chilly siloBOT
#

Following the limit enforcement discussed in https://github.com/discord/discord-api-docs/issues/4118

Larger servers are fulfilling their invite list in a few hours, so to make room for new invite to be created, they to delete oldest or none used invites.
To delete these Invites, they mostly spam the delete button in server settings, which lead to their ip to be banned from this endpoint for like an hour a bit annoying but I can understand.

The problem is, for a discord bot, invites del...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I believe this may have been due to a register_commands vs sync_commands -- I'll have to confirm that later (still cannot register anything), but this may be a non-issue.

I'm still curious about the rest of the issue though -- is this ratelimit a 24 hour ban on registering commands? Is it per developer? etc

I'm also still curious -- why is the ratelimit 200, even for guild commands? Is it that taxing to register a command with Discord's API?

chilly siloBOT
#

Description

ListActiveThreads has two declarations in the API Documentation:

const (
    EndpointListActiveThreads = "channels/{channel.id}/threads/active"
    EndpointListActiveThreads = "guilds/{guild.id}/threads/active"
)

Steps to Reproduce

https://github.com/switchupcb/dasgo/issues/1
Result after resolution: https://github.com/switchupcb/dasgo/blob/main/dasgo/endpoints.go

Expected Behavior

const (
    EndpointListActiveThreads      = "channels...
#

Is the ratelimit a 24 hour ban from making ANY registrations on ANY bot you own? Is there a reason this ratelimit applies to the developer and not the application itself?

No. This applies to just the application itself, and not all of your apps. I just tested with a bot account, of which I made and deleted 200 guild commands, which exhausted all creates for that guild for the day, for that application.

Testing the same code on a different bot token successfully made a guild command i...

#

Testing the same code on a different bot token successfully made a guild command in the same guild as above.

That's odd. I tried this exactly -- I tried running the bot with an alternate bot token / application (all of my commands specify a guild ID to register to for now) -- and it would not register any commands still.

I thought it was application-specific, but the behavior I experienced showed otherwise. May have been some other factor involved, I guess.

chilly siloBOT
#

@splatterxl Probably not, or at least until some revisions to the sidebar take place on our side to allow for more customized navigation structure. The getting started guide is framed a bit different than other tutorials we're planning on writing (and will be edited more to be kept up-to-date), and we want to keep that top-level for now since it's meant to be a very visible resource for new devs.

That may change in the future though

chilly siloBOT
#

Changing this was denied in #3558 because the endpoint is deprecated, but I don't see why that precludes changing endpoint name(s). I think that there should be a guarantee that two endpoints that do different things should have different names. Get Guild Invites and Get Guild Channels is a good example. Indeed, the link to the non-deprecated endpoint is named "List Active Guild Threads" indicating that there is a distinction.

If changing the name is somehow a problem, maybe add `(depr...

chilly siloBOT
chilly siloBOT
#

@shaydewael I believe there are three patterns
The major pattern is change key is a property name on the object represented by the target_id property, whose value represents the entire value of the change.
Secondary pattern - most of the keys, with notable exceptions like channel overwrites (supposedly), represent a direct field that contains a singular value, not an array or an object.
Tertiary pattern - The string for the action_type property represents the entity that changed + how it c...

chilly siloBOT
chilly siloBOT
#

I can reproduce this without permissions v2:

[ {
  "name" : "hello",
  "options" : [ {
    "name" : "channel",
    "description" : "No description",
    "type" : 7,
    "required" : true
  } ],
  "description" : "No description",
  "type" : 1
} ]

image

![image](https://user-images.githubusercontent.com/18090140/166566252-8fa1245e-e05f-4e78-8e2b-8ab312983a0...

chilly siloBOT
#

Description

I am attempting to receieve MESSAGE_CREATED events for servers I am in. Most servers work fine, but for some servers I receive PRESENCE_UPDATE, CHANNEL_UNREAD_UPDATE, VOICE_STATE_UPDATE events but not MESSAGE_CREATED events. I have my intents sent to 513, which should receieve MESSAGE_CREATED events

Steps to Reproduce

  1. open up a websocket connection to the gateway
  2. send the initial "op": 2 request with the user token
  3. listen for events, notice the missing MESS...
chilly siloBOT
#

Description

When creating a Guild command, I am implementing multiple commands on my test server. I noticed whenever I try register a command, only the last one appears on the discord command list.

However, in the documentation: https://discord.com/developers/docs/interactions/application-commands#registering-a-command
Your app cannot have two guild CHAT_INPUT commands within the same name on the same guild

Is this expected behaviour? If so, I will make a PR to improve the docume...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Can confirm that - using the latest DiscordJS REST extensions, it essentially does NOT update permissions for guilds reliably when using PU. Most of the time, nothing happens when using default_member_permissions with my commands, they just remain inaccessible for all users, admins included.

That's a major problem, considering the whole premise of our bot is easily configurable permissions for guild-specific command/permission combos via setup commands available to admins.

Currently, co...

chilly siloBOT
chilly siloBOT
#

You'd be still able to respond with an error. That would behave the same as followup messages after the defer, like if you defer non-ephemeral and the interaction times out, the error would also be non-ephemeral.
Same thing would go with "respond with a message to error", there's nothing that would be changed. If you defer non-ephemeral and wish to answer with an error message, there's no way to make this ephemeral.

chilly siloBOT
#

It also just deleted the commands of another bot from the suggestions, making it unusable. I'm not sure how doing a PUT request for one bot, would affect the commands of an unrelated bot.

I've now witnessed this happen as well. An application had its commands updated, which disabled some commands on other bots, even for admins, until they had the same permission toggle workaround used on them.

chilly siloBOT
chilly siloBOT
#

ephemeral messages could be used to reply to interactions to display errors to a specific user.

I don't think ephemeral messages are a suitable stand in for errors, not only because of the experience in app but because to do this generally you need to be able to send an ephemeral message at any point in the interaction flow that you might have an error crop up.

Imagine you're writing a library, and wish to have an error method/function. Maybe it might look something like this:

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Hi!

For those who are not aware, discords slash commands limit only the newest 50 bots to work in the server. For any of them after, slash commands will not show up / cannot be configured through the integrations page.

I feel like discord has forgotten to account for a lot of large servers where 50 bots is a common occurrence. While I understand this change helps in combatting servers filled with thousands of useless bots, I don't see a reason why this cannot be reasonably rai...

chilly siloBOT
#

HTML is disallowed in Discord messages for, well, obvious reasons. However, a limited subset of Markdown is supported:

**Hi! I'm bold**, __and i'm underscored!__
_I'm italic, **and i'm italic bold.**_.
`inline codeblocks are supported too`

and \`\`\`
normal codeblocks too (with a few languages syntax highlighted too!)
\`\`\`

Additionally, in Forum Posts, unordered lists and headings are supported. This is probably where you're getting the anchored links from.

#

HTML is disallowed in Discord messages for, well, obvious reasons. However, a limited subset of Markdown is supported:

**Hi! I'm bold**, __and i'm underscored!__
_I'm italic, **and i'm italic bold.**_.
`inline codeblocks are supported too`

and ```
normal codeblocks too (with a few languages syntax highlighted too!)
\```

(remove the backslashes of course)

Additionally, in Forum Posts, unordered lists and headings are supported. This is probably where you're getting the anch...

chilly siloBOT
chilly siloBOT
#

Currently, when submitting a command the only way for a bot to let the user know there was an issue with the command is responding the a message detailing the error (which is fine), however, this also clears the command input from the text box. This means the user has to either copy paste or retype everything manually. What I'm proposing is a new response type that shows an ephemeral message on the user's client alongside loading the command input back into the chat box. The response would in...

chilly siloBOT
chilly siloBOT
#

Description

The official client does not clear its command cache upon an invalid application command error. This is a problem as I have updated some commands (deleted a few and added others), and I do not want to require all users to refresh their client before they are able to use my new commands, nor receive errors of invalid commands.

Steps to Reproduce

  • Use a command
  • delete said command
  • try to use it again, the cache will not have been cleared

Expected Behavior

Cli...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

This adds a guide to walk devs through implementing and designing application commands, especially if they're currently using message content. A lot of this is based on feedback asking for guidance on where to start with implementation, onboarding patterns for commands, and just general framing for commands outside of more reference-focused docs. The intention is to keep this guide pretty high-level to lay out information, then link out to relevant docs for more info.

Also I think folks w...

chilly siloBOT
#

This pull request cleans up the Guild object by moving fields specific to the GUILD_CREATE event, to the documentation for said event.

The point is for this to make it easier to read the documentation by reducing the amount of fields and arguably more importantly removing optional/nullable fields for static typing cases. The end result is that it is much easier to work with the API since you get a clearer understanding of the Guild object.

chilly siloBOT
#

Right now, we have to use a command like /settings or an online dashboard to configure settings an application might offer, such as a changeable language. This, however, could be improved by providing settings inside Discord that an application would utilise, this also gives the end-user an easier way to configure the application or configure multiple applications in one place. Something similar like command permissions v2, only allowing developers to customize it a bit. For instance, there...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT