#github-notifications

1 messages ยท Page 24 of 1

chilly siloBOT
chilly siloBOT
#

This is mostly an architectural problem for us right now. Ephemeral messages currently skip a lot of our infrastructure paths that normal message sending goes through--it allowed us to make them super easily and have that "disappearing" behavior we want.

This is a totally understandable reason, but the support article for these Ephemeral messages literally demonstrates the feature using an embed...

The article is probably ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

As the documentation states, you should be using guild-specific slash commands for testing, as these are instant.

Say in an update you have edited the arguments a command takes in your bot code, but not in discord. How would you update the bot along with the discord commands? You would either have to be compatible with the old arguments and the new arguments (and then later release an update that removes support for the old arguments), or you would have to wait until the ch...

chilly siloBOT
chilly siloBOT
#

@WickedTree You can only send strings instead of actual regular expressions. Discord might allow it but it's unlikely. And pattern validation is just one example, there might be more rules that you want your arguments to follow. The list I have given is not exhaustive. You might even want to check the argument with a record in the database, etc. Think client-side vs server-side validation. The client can only validation so much. It's only for the user experience. The server is where most of ...

#

Description

After acknowledging a slash command interaction, there appears to be no way to get the channel message id for the interaction source message (if you decide to show it), or the message you reply with in the initial response.

Why This is Needed

I think it's important to be able to link an interaction to the messages it sends in a channel. An example could be deleting messages related to the command run after X amount of time to clean up the channel, or to link react...

chilly siloBOT
#

Description

On mobile, the arguments required for a slash command are not required.

Steps to Reproduce

ยท Select a slash command that requires arguments. ยท Send the message ยท Discord will not give the "This option is required. Specify a value" message as it does on PC

Expected Behavior

Discord would show the error prompt: "This option is required. Specify a value"

Current Behavior

Discord sends the slash command, thus bots receiving no options and d...

chilly siloBOT
chilly siloBOT
#

Description
When creating a command parameter with a mixed-case name (such as camelCase), the casing of the name is not retained in the UI or created interactions.

Generally, it would simplify integration with bots and improve UX if casing was retained - for example, the readability of a name consisting of two or more words degrades significantly if casing is normalized (shouldDoThing vs shoulddothing). It also enforces a less strict matching behaviour on the part of the implement...

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

Description
on iOS, the bot profile doesn't open when it's username or avatar are tapped in a slash commands response message, like a regular webhook message and unlike a regular bot message

Steps to Reproduce

  1. find a slash command response message from a bot
  2. tap its name or icon in the message on iOS

Expected Behavior
The bot's profile opens

Current Behavior
nothing happens, like for normal webhook messages

Client and System Information
Discord iOS TestFlight 54....

chilly siloBOT
chilly siloBOT
#

Description

The Security and Authorization section of the docs on Slash Commands could use some brief mention of caveats of running a public web server to receive webhooks, and maybe brief configuration snippets for apache/nginx for discarding requests that don't have discord's X-Signature-Ed25519/X-Signature-Timestamp headers. e.g for nginx:

server {
        listen 80;
        server_name botendpoint.example.com;
        location / {
                # if request i...
chilly siloBOT
#

While what wicked mentioned is a possibility it's not very user friendly as users shouldn't be having to add the bot to be able to use it in dms imo. I agree we just need a small field on the command for where it's usable, aka a list of channel types or just a simple "guild", "private" or "all" setting.

Just like xSke I have a lot of commands that just can't do their job in dms. like roleplay command such as /hug, theres nobody to hug in dms so no point to show them in dms.

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

Whenever I attempt to save changes on anything in server settings, I click the "Save Changes" button and it loads then shows the save changes option again. I cannot escape this screen and cannot apply any changes to my server.

Steps to Reproduce

Perhaps Discord can fix it so that it saves the changes and doesn't force the user to be locked in that save changes menu forever.

Expected Behavior

I expected it to save the changes, the menu to go down, ...

chilly siloBOT
chilly siloBOT
#

Description
Get first_message_id snowflake of a text channel.

Why This is Needed
This will be very useful for bot developers to find the first message of a text channel since getting this is a bit difficult.

Alternatives Considered
It's possible by iterating over every messages in the text channel and finally getting the first message. However it's not practical as this would make it a slow operation.

Additional Details
N/A

chilly siloBOT
chilly siloBOT
#

In order for a web service to accept intent webhooks from Discord, we require that you implement appropriate signature checks for authentication. Among these, we send a few well signed, and improperly signed requests to see if the server is well behaved, and on a regular cadence, as your slash commands operate, we send improperly signed requests. The intent of this is to ensure that people are implementing proper authentication measures. If your server fails these checks, we disable the inter...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Little update:
It seems I could use the bot's command when I backspace after Discord recommends/selects the command.

For example: When I type /nick does Discord automatically select the nick command, but I can then backspace to append name to the command.

While this is a solution, for now, is it still not really intuitive and a better alternative to select commands and IF you actually want to select those in the first place should be considered.

chilly siloBOT
#

A library developer for the relevant API of the slash commands did mention that it was incomplete and going to be a rushed implementation. Here's to hoping that the major flaws are resolved soon.

My guess would be that you mean MinnDevelopment. He did gave his thoughts about the slash-command and the overall disappointment that it was rushed so much.

chilly siloBOT
#

This PR adds a link to caddy-discord-interactions-verifier in the community resources. This module is a fully functional, installable extension to the Caddy web server that performs verification of webhook requests at the edge server, requiring a single line of configuration and zero application-level logic related to verification. Given that many endpoints are fronted by a server like Nginx or Caddy to terminate TLS (whi...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When establishing a POST request to https://discord.com/api/oauth2/token, (as long as I submit grant-type of โ€œauthorization_codeโ€), no matter what other params are included, it returns a 500 internal error.

Steps to Reproduce

  1. POST to https://discord.com/api/oauth2/token, with a grant-type of authorization_code. (Having any other params or none at all doesnโ€™t affect the return)
  2. Witness the 500

Expected Behavior

Would return the token or a 400 (...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Looking at the GameSDK source code these should be UInt8s:

struct DiscordUserAchievement {
    DiscordSnowflake user_id;
    DiscordSnowflake achievement_id;
    uint8_t percent_complete;
    DiscordDateTime unlocked_at;
};

struct IDiscordAchievementManager {
    void (*set_user_achievement)(struct IDiscordAchievementManager* manager, DiscordSnowflake achievement_id, uint8_t percent_complete, void* callback_data, void (*callback)(void* callback_data, enum EDiscordResult re...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description
In order to prevent bot hijacking, it should be possible to know atleast how many devices are connected given a bot token and a way to regenerate the bot token if the above new endpoint detects more than one device.

Why This is Needed
This will prevent lots of cases where the bot token is leaked and no one is aware of the problem

Alternatives Considered
None

Additional Details
No

chilly siloBOT
#

Description
Discord is unable to reach my server using IPv6 and says that the interactions endpoint is not available. I do not see an incoming request from Discord on my server.

Why This is Needed

Some ISPs enforce CG-NAT, which disallows users to port forward on IPv4. Because of this, I cannot use interactions using incoming webhooks (since I am making a bot, I use the INTERACTION_CREATE event, but I want to outsource the command handling to another server).

**Alternative...

chilly siloBOT
chilly siloBOT
#

I would recommend dropping in Cloudflare to terminate your TLS connections if you cannot move to an ipv4-supporting provider. Our cloud provider, GCP, does not have much support for ipv6 (only in their global load balancers at this time).

I am currently using ngrok as a fallback solution to tunnel HTTPS to my server without IPv4 port forwarding. I already use Discord for other scenarios, but my bot does not own "a real domain", which is mandatory to use Cloudflare.

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

The API documentation mentions application flags (introduced in https://github.com/discord/discord-api-docs/pull/2295), but there is no documentation for the enumeration.

I could find out the following flags:

Flag Name Description
1<<13 Presence Intent Denotes that the application has the GUILD_PRESENCES intent enabled on the discord developer page
1<<15 Server Members Intent Denotes that the applica...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Slash commands could have their own per guild settings.
Just like like roles have guild wide and channel specific options, slash commands could be the same.
If a bot has a mute command the owner could enable a mod role access to that command but deny it to other roles. And if the bot has an 8ball command the owner can enable it in a bot commands channel but disable it in a general channel.

chilly siloBOT
#

Description
Right now all sub command groups and sub commands are returned as part of the options field, this makes them more difficult to separate when there is a mixture between the 3 command groups.

Why This is Needed
Most developers modularize their code as it becomes easier to manage, this will allow for code and organization to be cleaner.

Alternatives Considered
What I propose is that instead of returning this
![image](https://user-images.githubusercontent.com/248...

chilly siloBOT
#

Currently to get the name of a subcommand inside a group you have to do this

Command: ${interaction.data.name}
SubCommandGroup: ${interaction.data.options[0].name}
SubCommand: ${interaction.data.options[0].options[0].name}

However not all commands have subcommands or groups, if you have a command and subcommand with an argument the structure is still the same, however the same code will return the name of the argument as what "SubCommand" is.

There is nothing distinguishing...

#

I see what you are getting at, however, there is a way to check given an interaction.
Whether or not the options parameter is present on each level gives you that information
Basically your pseudcode is this:

on interaction
command = interaction.name
subcommandgroup = null
subcommand  = null
options = interaction.options
if options?.options
  subcommand = options.name
  options = options.options
  if options?.options
    subcommandgroup = subcommand
    subcommand = options....
chilly siloBOT
#

As far as I can tell, all of this can be addressed client side, where the data can be shaped to your liking. If you are accessing the raw response data as is, yes, you'll have a bad time. If you transform it to something that is more ergonomic for your language and environment, you'll have a better time.

There exist a few implementations right now that abstract the nesting away and provide a better interface for building slash commands.

Anyways, going back to the premise of this issue...

chilly siloBOT
#

Slash commands could have their own per guild settings.
Just like like roles have guild wide and channel specific options, slash commands could be the same.
If a bot has a mute command the owner could enable a mod role access to that command but deny it to other roles. And if the bot has an 8ball command the owner can enable it in a bot commands channel but disable it in a general channel.

This would be ideal, but it's a big ask IMO. A simpler approach like OP (with a few tweaks) w...

chilly siloBOT
#

Description
After about 24h of the bot running (sometimes more and sometimes less), the connection is randomly closed by Discord with no information. For now, our temp fix is to treat it as a reconnect, but I would rather have a long time solution to this. Is there something that we are doing wrong that is killing the connection or is it a bug on Discord's side that is randomly closing active connections?

Steps to Reproduce
I don't know any concise steps, but the disconnects seem...

#

its intended to be disconnected and asked to reconnect between every 15 mins and 4 hours; are you experiencing something else? 24 hours sounds too long to be that

We do receive reconnects and reconnect accordingly. This seems to be something else. I have tried my best to debug everything and try to figure out what is going on.

Initially we thought it was the lib we use aiohttp as we just got a message saying that the connection was closed, no further info. After painful debugging I ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I see what you are getting at, however, there is a way to check given an interaction.
Whether or not the options parameter is present on each level gives you that information
Basically your pseudcode is this:

on interaction
command = interaction.name
subcommandgroup = null
subcommand  = null
options = interaction.options
if options?.options
  subcommand = options.name
  options = options.options
  if options?.options
    subcommandgroup = subco...
chilly siloBOT
#

Description

Similar to the Discord tags, e.g. , it would be nice to be able to do slash command shortcuts. Such as which would resolve to a clickable text and allow the user to "click" it to run that command (or prefill it?). And hovering would of course show them the command, bot, parameters, etc. It would of course ask for confirmation much to how outlinks work, and allow a user to "trust" this bot / user.

The shortcut could specify the parameters as well.

Example:

Say ...

chilly siloBOT
#

DiscordPHP has returned from the dead and most (all?) of the latest features have been implemented.

The rate-limit system was approved back in 2016 but has been revamped to handle rate-limit buckets which were not present back then. This includes halting all requests on a 429 and attempting to bundle requests together to predict rate-limits.

The current rate-limit handling can be found here:

chilly siloBOT
#

A slash command also have to give the bot it wants to use the command on, if there are any slash commands with the same name.

What if

  1. Bots could only make shortcuts to their own slash commands
  2. if users could make them, they need a special permission like menage messages or something entirely new

And then the slash command would look something like

<botid/command:param=value>
And maybe the command id and the name are interchangeable

#

A slash command also have to give the bot it wants to use the command on, if there are any slash commands with the same name.

What if

  1. Bots could only make shortcuts to their own slash commands
  2. if users could make them, they need a special permission like menage messages or something entirely new

And then the slash command would look something like

<botid/command:param=value>
And maybe the command id and the name are interchangeable

The bot would ...

chilly siloBOT
chilly siloBOT
#

My bot's entire purpose is to create custom per-server re-useable tags that can be called up with its name. This is an exceedingly common use case for slash commands - discord-developer's own Discord DevBot could use it for the official server.

But having a limit of 50 maximum commands doesn't work for me. I have more than that in a few of the 60 guilds I'm in, so right away I know I cannot possibly move to slash commands as the limit in place is too restrictive. "Oh I'm sorry you can onl...

#

My bot's entire purpose is to create custom per-server re-useable tags that can be called up with its name. This is an exceedingly common use case for slash commands - discord-developer's own Discord DevBot could use it for the official server.

But having a limit of 50 maximum commands doesn't work for me. I have more than that in a few of the 60 guilds I'm in, so right away I know I cannot possibly move to slash commands as the limit in place is too restrictive. "Oh I'm sorry you ca...

chilly siloBOT
#

I just want to give an add-on to this issue since it hasn't seen any movement (probably because of holidays). I understand that the reason for this coupling is because the WYSIWYG editor is a completely different system from the legacy textbox, which has various features that slash-commands rely on and wouldn't easily be accomplished using plaintext.

A potential solution I can think of to resolve this would be to consolidate the legacy chat box with the WYSIWYG editor, instead of maintaini...

chilly siloBOT
#

As of right now, granting the scope applications.commands.update to an application allows the token to update the slash commands of any bot that the user that authorized owns. This scope makes perfect sense when an application is using client_credentials to get the owner's token to update its own commands, but not so much when granted through the regular authentication flow. If I'm authorizing a bot and I see that it requests "Update slash commands" in addition to "Create slash commands i...

chilly siloBOT
#

Mentions for any member, in any channel.

I believe this is needed for server moderators who frequently use staff channels. Mentions for the user do not show unless they have permission to view this channel

This solves the problem of having to use a public channel where the mentioned user has permissions.

I've considered some alternatives like using a string type.

https://user-images.githubusercontent.com/64027609/103479462-c4165680-4d9b-11eb-952c-c9cf55164c34...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When a users posts a message containing a link/url with an embed, the "MESSAGE_CREATE" event that is sent might contain an embed with an embed provider with its url field set to null, even though the documentation (https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure) states, that the fields either have a non-null value or are not present. This leads to issues in deserializing a message in a null-aware language like Kotlin...

chilly siloBOT
#

Description

The interaction for a "Ping" does not have fields that the docs says it should - of course I get why there's no guild_id associated with this, but at least set a note.

Steps to Reproduce

Log the interaction body you get when you add your url as an endpoint.

Expected Behavior

There is a note on the docs that ping interactions are special.

Current Behavior

https://discord.com/developers/docs/interactions/slash-commands#interaction no notes or a...

chilly siloBOT
chilly siloBOT
#

Description
The request is for the client to allow and/or auto-complete a user's snowflake ID pasted to a mention of the user if that user exists in the guild. It could be something like this:

Does the pasted number resemble a user snowflake in this guild?
If yes, change it to a mention of the user. If no, delete and give a client-side error.

It could also have a "Paste" button that only shows if developer mode is enabled and if the clipboard resembles a user snowflake I...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I think there should be no reconnect as the voice server remains the same.

If you carefully read the logs you show in your video, you can tell that this is not true. Bigger servers do not use the same voice server for all channels. The connection is closed because the server is changing. Making a new close could would be breaking for existing implementations, such as JDA which rely on the current behavior.

#

I think there should be no reconnect as the voice server remains the same.

If you carefully read the logs you show in your video, you can tell that this is not true. Bigger servers do not use the same voice server for all channels. The connection is closed because the server is changing. Making a new close code would be breaking for existing implementations, such as JDA which rely on the current behavior.

I have updated my issue then to the previous version, but I did not realiz...

chilly siloBOT
#

Description
Similar to pending for the membership screening, it'd be nice to have a way to know if someone passed the server verification or having pending cover it as well.

Why This is Needed
To make sure not to give a role to a member that didn't pass the verification; since giving a role makes them bypass it

Alternatives Considered
Checking if the member has sent a message

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I think a lot of these problems result from the fact that what various Discord API libraries do on their own now needs to be supported by Discord itself. Just comparing the requests in here with what I know discord.py supports:

  • (Naive) aliases - 100% possible to map message.content.startswith(('embrace', 'hug')) to the same function, but no way to do it in slash commands
  • Hiding inaccessible commands - discord.py, at least, has a system of checks that removes items from its !help...
chilly siloBOT
#

Description
Allowing the server to respond to the post request for the interaction with a http error code (maybe 422/400), having a reason with the response, and then reflect that on the client side (do the red shaky thing with the reason). This could allow for more advanced command validation, like say a parameter should be a string, but should be on the server's database. The server could then process that and either give a 200, saying that everything went ok and the user entered ...

chilly siloBOT
chilly siloBOT
#

Description

Logging requests for a webhook's avatar URL when executing a webhook, the only request header set is a user agent (and that doesn't even specify Discord as the requester.)

Why This is Needed

Images can change. For my own usage, this is with webhook avatars. Webhooks frequently represent messages from a person, and people are able to change their avatar, say represented at site.com/avatars/username.jpg. T...

#

I like this idea; however, with the 3 second timeout that currently exists for interaction responses, there's a far greater chance an error code like this might get lost because the backend takes too long to determine whether something is or isn't valid.

Since this also only mentions the http callback interactions, alternative solutions that also include the gateway method should be considered - perhaps not a HTTP error code, but rather a property in the returned response payload?

chilly siloBOT
#

I sort of skimmed through most of this so I'm not sure if this has been mentioned, but why not have a "Increased Slash Commands" system like there is for sharding when at 250,000 servers? Just like intents verification, show proof of your need for more than 50 commands. This could be maybe a few tiers, like going from 50 to 100 to 250 commands. Not sure what other people's thoughts would be on this, but this is just what came to my mind when I read this.

#

Can we at least get some documentation on the expiry rules of the cache? As of now, it's a guessing game. A header that indicates when the avatar will expire would be nice.

Why not support the Cache-Control header to allow the web server to specify how long to cache the images for? Accepting that header shouldn't cause any hit to performance and everyone wins. That plus a minimum cache age (say, a day) would be amazing.

The only other "solution" to problem is setting a random query pa...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description
Recently I have been messign around with the new slash commands and came upon an issue where if I type an incorrect option, switch channels, then come back to the original one, I have to press enter twice to get the invalid choice error message.

Steps to Reproduce

  1. Type a slash command with an option and an invalid choice (my example was /testhelp category: ff when my options are entertainment or minecraft)
  2. Switch to another channel anywhere in Discord
    ...
chilly siloBOT
chilly siloBOT
#

If you have the exact conditions on any server it will not be able to mark here or everyone


Steps:

1 - Take any server (that you can execute the bug, permissions: manage jobs, mention all jobs)

2 - Create two positions, one with the name of everyone and the other with the name here (both being mentionable or not (but the bug was discovered being mentionable))

3 - After that try ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I like this idea; however, with the 3 second timeout that currently exists for interaction responses, there's a far greater chance an error code like this might get lost because the backend takes too long to determine whether something is or isn't valid.

Yeah, that could be a problem. Although it is possible it could be raised in the future. But 3 seconds is still a pretty long time to just validate arguments.

Since this also only mentions the http callback interactions, alternative...

#

Ok guys, thanks, gathering all yours advice , we got this:

  • the only way to read channels and messages is by bot's account an this bot has to belong to the server chat. is it right?
  • another way is installing discord RPC in linux/windows/mac and use the scopes "messages.read" and "rpc.notifications.read" pointing to Discord RPC endpoint API.

is it ok, what I just said
?

#

@muddyfish I tried copy pasting your curl and it's still not working

hackintosh:~ spiral$ curl "https://discordapp.com/api/oauth2/token" -H "Content-Type: application/x-www-form-urlencoded" --data "client_id=$client_id&client_secret=$client_secret&grant_type=client_credentials&scope=identify email"
{"error": "invalid_scope", "error_description": "The requested scope is invalid, unknown, or malformed."}
hackintosh:~ spiral$
hackintosh:~ spiral$ curl "https://discordapp.com/api/oauth...
#

It does? The Python example for oauth looks like this:

API_ENDPOINT = 'https://discord.com/api/v6'
CLIENT_ID = '332269999912132097'
CLIENT_SECRET = '937it3ow87i4ery69876wqire'
REDIRECT_URI = 'https://nicememe.website'

def exchange_code(code):
  data = {
    'client_id': CLIENT_ID,
    'client_secret': CLIENT_SECRET,
    'grant_type': 'authorization_code',
    'code': code,
    'redirect_uri': REDIRECT_URI,
    'scope': 'identify email connections'
  }
  headers = {
    '...
#

It does? The Python example for oauth looks like this:

API_ENDPOINT = 'https://discord.com/api/v6'
CLIENT_ID = '332269999912132097'
CLIENT_SECRET = '937it3ow87i4ery69876wqire'
REDIRECT_URI = 'https://nicememe.website'

def exchange_code(code):
  data = {
    'client_id': CLIENT_ID,
    'client_secret': CLIENT_SECRET,
    'grant_type': 'authorization_code',
    'code': code,
    'redirect_uri': REDIRECT_URI,
    'scope': 'identify ema...
chilly siloBOT
#

@Ratismal you have it mostly correct, yes. This toggle "works" to turn off slash commands because it's actually entirely changing our text editor. The new editor uses the Slate library, which we rely on heavily for slash command implementation.

"Turning off" slash commands is definitely not intended. In fact, the old editor is used by an infinitesimally small percentage of people at this point; I think we had considered just retiring it but decided not to just for scope reasons. Anyway, we...

#

What if you have two arguments that are optional, but rely on each other, and if one is given, the other must be given too?

That in particular is interesting, thanks for bringing that up.

As far as....idunno how we'll call them, "split" arguments? "Multi-arguments"? Wanting to accept a user or a role, or a role or a string, etc. I think there is actual distinction in the details

For example, if you wanted to allow a user to give you a user mention or a user id, there is a world in ...

#

As others have brought up enough, development iteration should be done with guild commands, presumably in your own test guild. Mutating global commands for testing and dev iteration is not a great user experience to begin with.

However, you raise a valid point in the state of your commands vs. your code as global commands propagate. If you changed an argument that was a user to a channel, you may be getting payloads from guilds that are valid for those users, but do not match your code...

#

3 seconds is less of a technical number and more of a user experience number. There's been some research done that suggests that 3 seconds is about how long a user will wait and still perceive something as "fast". If you need longer than 3 seconds to do whatever option you need to do, you should considering doing an ACK with an async response.

However--we'll look at those numbers from GCP/AWS/Azure/CF Workers to see if we're in line with the best practices they recommend.

As far as user...

#

Yup ๐Ÿ‘ This was an oversight on our part with how we're currently handling subcommands and groups. Those are all at the top level in the UI right now, so default is...doing nothing. When we move them to an autocomplete style instead, default will allow you to use the base command again (which is also currently not working)

So for example, you could have

/tags <-- this is default
/tags add
/tags list
chilly siloBOT
#

I think this is probably better solved as not a slash command interface, though. I imagine having a form modal with a text box would be much preferred? :p

For my use cases, absolutely, yeah, a full "text area" control would be much better. Although not having either of those options is an adoption blocker for me right now, so I'm not sure what would work in the short term? Are generalized full form modals a planned upcoming feature?

chilly siloBOT
#

I feel that there are two alternatives to this:

Alternative 1: Keeping Command Limit

Before you guys start yelling at me saying that the whole point of this issue was to raise the limits, let me explain my thinking. So, we are all (at least most of us) developers who are fluent in the ways of the computer, and are all probably powerusers. Unfortunately not everybody in this world is like that. There are many users of discord who instead of typing a command out, use the nice list of co...

chilly siloBOT
#
  • up to 10 command groups with up to 20 commands each

Maybe instead of this, it is 200 total grouped commands where each command group can have up to 50 commands (which if all your groups do, leaves you 4 groups) and you have up to 20 command groups.

Regardless of how its implemented, this will probably be more relevant after subcommand grouping displays are fleshed out.

chilly siloBOT
chilly siloBOT
#

@Rapptz I cannot reproduce.

I have created the following Server Template: https://discord.new/tTDygTUQfCf2

v6 call:

โžœ  discord git:(master) curl https://discord.com/api/v6/guilds/templates/tTDygTUQfCf2
{"code": "tTDygTUQfCf2", "name": "asdf", "description": "asdf", "usage_count": 0, "creator_id": "141065743197405184", "creator": {"id": "141065743197405184", "username": "tpcstld", "avatar": "ea56995ac11b6b9dce6335a3916cefec", "discriminator": "9522", "public_flags": 129}, "creat...
#

@tpcstld It's right there in your snippet.

"permission_overwrites": [{"id": 0, "type": 0, "allow": 0, "deny": 1040, "allow_new": "0", "deny_new": "1040"}]

The types for permission overwrites used to be 'role' and 'member' in v6.

@tpcstld It's right there in your snippet.

"permission_overwrites": [{"id": 0, "type": 0, "allow": 0, "deny": 1040, "allow_new": "0", "deny_new": "1040"}]

The types for permission overwrites used to be 'role' and 'member' in v6.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description
When a slash command is used in iOS and a custom emoji is used in a string option, it is sent as :name:, not as the custom emoji format.

Steps to Reproduce

  1. Have a slash command with a string option
  2. Use it on iOS and include a custom emoji in the value

Expected Behavior
it sends the proper format (``)

Current Behavior
it sends :name:

Screenshots/Videos
![image](https://user-images.githubusercontent.com/11778454/103747281-42027980-4fb7...

chilly siloBOT
#

Buttons as another "interaction type" would absolutely be appreciated for me, but that sounds like a slightly-further-future thing. I was thinking about Markdown links but never managed to make an issue for it :)

My bot has a lot of "interconnected" prompts with occasionally opaque IDs that need to be copied/retyped in order to navigate. It's one of the absolute primary pain points for users of it, but so far there's been no clean way for me to improve it. Support for links or link groups,...

chilly siloBOT
#

Also +1-ing here, as this would help with accessibility/usability immensely for my bots. The main one I'd like to implement this for is a form bot that uses both reactions and text to complete actions- while this works fairly well, the footer is enormous and hard to read due to having to explain the emojis/keywords for each action. Being able to link to something to do that action or having a button explicitly for it would be amazing. Definitely hoping something like this will be implemented!

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

The UI has been updated to hide this permission on voice channels, but it is still available in our API. All channels are the same data model on our end. You can set this permission on store channels as well.

Because it's true in the API I would prefer the documentation to be accurate. It's low priority for us to validate these kinds of permissions on the API side since you can't do anything with them.

#

I don't have a timeline. I do want to support slash commands in Discordia, but I can say that it's not "imminent".

I have (at least) two branches for Discordia: one for the current version 2.x and one for the development of 3.x. Slash commands will go into the latter, but not until after feature parity is reached. I originally hoped to have a mostly complete version before the end of 2020, but for a variety of reasons, that did not happen.

Discordia has a small community, where I find t...

#

I was aware that Discordia 2.0 won't receive slash commands support that's why this library was made. The library is done and now I want to work with next version of Discordia both with slash commands and overall. But currently there is no stable base to help with.

TLDR:
This is the only library to make slash commands work for Discordia 2.0 users, might be integrated in 3.0 version but not very soon.

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description
Allow adding a message that is sent when the bot is offline. For example, the gateway could send a message to the user when the HTTP request to the interaction fails (or the callback times out).

Why This is Needed

  • If a user wants to issue a command to a bot and the bot cannot handle the command (e.g., offline, technical issues), the user should be informed about that. I think this is better than just sitting there and seeing ... nothing.
  • Bots are currently able t...
chilly siloBOT
#

Description

An endpoint to either:
a) delete all slash commands that are on all (!) guilds.
b) list guilds with slash commands.

Why This is Needed
There's no way to know which guilds you have registered slash commands for other than manual book-keeping, and that's error-prone.

Alternatives Considered

  • Keeping a detailed log of slash commands
  • Not caring about old slash commands possibly showing up on guilds and deleting an unknown slash command on the spot.

**Ad...

chilly siloBOT
#

I do not agree! Please don't add this!

This is my personal opinion and my attempt to open this viewpoint to others.

Upfront conclusion: Quite unintuitively aliases cause decreased usability and user experience. I think we should see slash commands as a reason to re-think and question our habits from "how bots worked up until now" instead of trying to achieve feature parity by all means necessary.

<details>
<summary>click to show text (to not clutter thread overview)</summary>

Thi...

chilly siloBOT
#

@almostSouji

As a user, I might even be inclined to believe these do different things! "Why has person A used !delete but person B !prune? Is one just everything and the other messages by a certain user? Maybe the last one who spoke? Maybe person C used !clear because it removes only bot messages? It seemed that way when they cleared the spam in #bot-commands at least!"

Bots can define descriptions for their commands, so if the bot owner, describe their commands concretely, the user c...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Could not find similar issue

Description

I have attempted to create a command for my discord bot !error, that would immediately DM me with issue description. I wanted to use ClientApplication.owner.createDM() method, but after adding const clientApp = new Discord.ClientApplication(); an error is given TypeError: Cannot read property 'id' of undefined at discord.js\src\structures\interfaces\Application.js:24:20. I have very recently started learning Js, so I wasn't able to ...

chilly siloBOT
#

Description
When I add a new global slash command via API, this slash command is only available on the server after a rejoin of the bot.

Steps to Reproduce

  1. Bot joins server.
  2. Create Slash Command via API.
  3. Slash Command is not available.

Expected Behavior

  1. Bot joins server.
  2. Create Slash Command via API.
  3. Slash Command is instant availabe on all server.

Current Behavior
see Steps to Reproduce

chilly siloBOT
#

Do you see APPLICATION_COMMAND_** events in your client/bot console? If so, you may need to press [Ctrl]+[R] in your discord client to reload the window.

No, I see no APPLICATION_COMMAND_** events (if you mean the developer console of discord). My bot is an only webhook based bot.

And does the issue also occur on other users that are using your bot?

Yes, all users on the server with my bot can't see the commands after create until I reconnect the bot.

chilly siloBOT
chilly siloBOT
#

I will have to agree with Souji here.
Most of the time aliases are used to achieve ease of use (avoiding issues when people who have seen !clear work for another bot and attempt to use it when your command is !purge).
This was only necessary because people have no way of knowing what commands a bot supports without either trying them out or viewing some sort of documentation. With the commands presented in a UI, this becomes a non-issue.

Agreeing even more as a power user; autocomplete i...

chilly siloBOT
#

Most of the time aliases are used to achieve ease of use (avoiding issues when people who have seen !clear work for another bot and attempt to use it when your command is !purge). This was only necessary because people have no way of knowing what commands a bot supports without either trying them out or viewing some sort of documentation. With the commands presented in a UI, this becomes a non-issue.

I agree with that, but I also think that "keywords" (see my previous post) could be the ...

#

After reading your the last comment, maybe there is a compromise here:
Allow aliases, but restrict the number you are allowed to have. I like a similar or other more descriptive tag as that is pretty standard UI across the web

I agree with that; I have seen users that invite few bots that have overlapping (legacy) commands, which - I think this is bad UX, but it was okay for them because they had different prefixes. Now slash commands are enforced to have the '/' prefix, which causes ...

chilly siloBOT
#

After reading your the last comment, maybe there is a compromise here:
Allow aliases, but restrict the number you are allowed to have (2-3 maybe)

I think it is good to restrict the number, but I think we should not be too limited. In this case, maybe there is a case where more prefixes could be useful (e.g., if you do not find one word to explain your command good enough and have to use words that are not commonly used in the language). It was thought that the 50 commands limit wo...

chilly siloBOT
#

Description

The apis User object should contain a timezone field, which would be his last used timezone or maybe changable with a setting in the client. It should make it possible to interpret times the user writes.

Why This is Needed

I have a Discord bot which has a remember feature. So if for example a user writes he wants to be remembered at 8:12 pm to go with his dog, the bot currently can just remember the user at 8:12 pm UTC because I dont know the current time...

chilly siloBOT
chilly siloBOT
#

Description

The reaction counts on the reaction objects are reporting incorrect counts.

Steps to Reproduce

GET /api/v6/channels/381965829857738772/messages/796966422877962260

The message history endpoint (i.e. /channels/:channel_id/messages) seems to not have this problem.

Expected Behavior

  "reactions": [
    {
      "emoji": {
        "id": "596577438461591562",
        "name": "upvote"
      },
      "count": 2075,
      "me": false
    }...
chilly siloBOT
chilly siloBOT
#

discord-interactions.py is a Python library for using the Discord Interactions API via the outgoing webhook functionality.
It provides multiple abstraction layers, separation between command structure and logic and is currently mainly based on Flask as a web server.

One of the core features is the so called Object-Command Mapper, which lets you create classes for your commands that function both as a generic definition of the command's...

chilly siloBOT
#

Exposing user locale or timezone is kind of a security risk since it exposes approximate location, but some sort of timestamp field would be nice.

I understand your concern but I think the locale field for language already tells about the location. I think a timezone has a bigger range than a language (if its not english).

i strongly disagree. Locale pins you to any country anywhere in the world. Timezone exactly pinpoints your location. If a user was +5 3/4 H you would be abl...

chilly siloBOT
chilly siloBOT
#

Description
Document what tense, person, etc. the default slash commands Discord provides are. (and other stuff like starting with a capital letter or whatever)

Why This is Needed
Not having 4 different conventions for 3 different bots + Discord.

Alternatives Considered

  • Normalizing description and name in client (this doesn't help with tense / person though)
  • Checking manually - I'm not 100% sure that Discord is consistent between locales and I don't care to spend 5 h...
chilly siloBOT
#

Hey :wave: More on more, I experienced that users are making small pull requests that fix one small change in the documentation. So I've prepared a big PR to fix them all at one slap. Here is my collection of consistency issues, wording issues, grammar issues, spelling mistakes I've encountered while rereading the entire documentation.

I've made the following changes:

  • Fix comma placing mistakes
  • Fix consistency issues (e.g., writing URL and url)
  • Fix particle issues
  • Fix gramm...
chilly siloBOT
chilly siloBOT
#
The HTTP API implements a process for limiting and preventing excessive requests in accordance with [RFC 6585](https://tools.ietf.org/html/rfc6585#section-4). API users that regularly hit and ignore rate limits will have their API keys revoked, and be blocked from the platform. For more information on rate-limiting of requests, please see the [Rate Limits](#DOCS_TOPICS_RATE_LIMITS/rate-limits) section.
chilly siloBOT
chilly siloBOT
#

Description
Editing an embed with another embed occasionally edits to the new embed, then edits back to the old one.

Steps to Reproduce
Send a message with an embed:
Edit it to another embed

Occasionally, it'll edit back to the original text.

Expected Behavior
It should always edit to the new embed.

Current Behavior
It edits back to the original embed occasionally

Screenshots/Videos
http://i.fionn.live/e64c25.png

**Client and System In...

#

Description
Editing reply message that doesn't initially ping, pings the user.

Steps to Reproduce

  1. Create a reply message that doesn't ping the replied user
{
  "content": "testing",
  "message_reference": {"message_id": "123"},
  "allowed_mentions": {"parse": []}
}
  1. Edit the messages content
{
  "content": "testing2"
}
  1. Observe the message in the client

Expected Behavior
Respects info provided and doesn't ping

**Current Behavior...

chilly siloBOT
#

Agreed. It's bad enough that, for my little "no cloud service needed" image pastebin tool for the privacy-conscious (UPnP and "what is my external IP address?" support planned before I make my first release), I feel the need to set up:

  • robots.txt (Which you ignore.)
  • X-Robots-Tag for a second chance at getting bots to understand how to handle direct image links
  • <meta name="robots"> for bots written by people who don't know about X-Robots-Tag
  • A middleware to blacklist User...
chilly siloBOT
#

In its current form, the documentation for POST /channels/{channel.id}/messages is confusing and messy.

Disregarding the formatting issues, here are my core problems with it

  • The two content types are documented simultaneously, using just one table for all fields

    • This is understandable in terms of keeping the section brief, but without expanding the table with additional columns or more detailed descriptions, you need to read a lot of extra information in order to understand...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I am also to reproduce, it seems like that the issue only appears when using the bot OAuth2 scope.

When using applications.commands only, you are able to select a server:
https://discord.com/oauth2/authorize?client_id=557628352828014614&scope=applications.commands

When using bot the site loads for a short while and then fails with a 500 Server Error (error code 0).

When using both, still the same as when only using the bot scope: https://discord.com/oauth2/authorize?client...

chilly siloBOT
#
  1. People often think that this section is talking about the HTTP API rate limits so I added an info block to clarify that it is not

  2. The current documentation says it limits "sending events" but that is inconsistent with the descriptions later in the page:

    Commands are requests made to the gateway socket by a client.
    Events are payloads sent over the socket to a client that correspond to events in Discord.

    This clarifies that it is about sending gateway commands.

chilly siloBOT
#

Description

Roles given to members by integrations (especially those completely managed by an integration) should not allow a member to bypass membership screening.

Why This is Needed

Some community servers are centered around a creator on twitch or youtube. Often times these servers have a integration set up so that subscribers will have a role. Because having a role bypasses membership screening, any members that would be granted these roles never see the membership gating ...

chilly siloBOT
#

I'd agree with a datetime type in slash commands, as well as some kind of "rich text" equivalent of strftime? Throw the client a unix timestamp and a format string, and it gets rendered as appropriate. I think that would solve most of the problems on its own without the privacy concerns. Plus, I'd just love to see more rich text options in general ;)

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

This doesn't look like intended to me, only just an overlook and I will explain why:

First starting with an rhetorical question to prove what night said is actually false:
If this is the intended behavior, then all bit-wise flag is also limited to 52 bits. The docs contradict it at Permission.md. So what is the Truth?

By checking the client source code, found, that Discord uses BigInt class for fl...

chilly siloBOT
#

most people using an integer option will want it to actually be an integer

  • You can get invalid user, role and channel id-s. Who wants a valid id anyways.
  • Integer choice values over 52 bits are broken too. Nice to get a 3rd value back if you have 2 choices.
  • You get Internal Server Error (500) when creating an application command with choice value over 64 bit integer.

I assume all of these is also intended.

chilly siloBOT
chilly siloBOT
#

Integer choice values over 52 bits are broken too. Nice to get a 3rd value back if you have 2 choices.

Thank IEEE 754 for that limitation, and RFC 8259 for adopting said limitation to be fully compatible with JavaScript, which the JS Object Notation derived from.

That being said, it's not something Discord can fix, they can't just ignore many web standards that have been set in stone for almost 8 years.

For all intents and purposes, you shoul...

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

Description

Slash Commands need a longer timeout then 3 seconds.

Why This is Needed

When running on Serverless setups many of the cloud providers give, if the Server Less hasn't been used, there can 1-2 second warm up time. If your command takes longer by retrieving data, you could exceed the timeout. While there are methods to keep functions warm, they increase the cost.

While you can always ACK and come back, most serverless see sending of response as "Function job is co...

#

Discord staff have said they would not be doing this. You can see the response here: https://github.com/discord/discord-api-docs/issues/2389#issuecomment-749228224

If you need more than 3 seconds to do whatever, then what you can do is have a separate service that proxies the requests to a backend (or a serverless provider) after automatically responding to the request with an ACK, from there you can use followup messages in order to continue as normal. Not sure what serverless provider yo...

chilly siloBOT
chilly siloBOT
#

Sending localized times is already possible, in embeds. See https://discord.com/developers/docs/resources/channel#embed-object-embed-structure for that ability.

note that embeds don't allow you to show a date time more than like 24h away while preserving the time.

If it's Monday and I set an embed time to Thursday at 7pm EST, users will just see "Thursday" until Thursday rolls around, at which point they'll see "Today at 7pm" (assuming they're in EST, etc)

Point is if you're schedu...

chilly siloBOT
#

Description
Adding a new InteractionResponseType that would respond with a message and show the user's input only for the user.

Why This is Needed
This would be useful for showing users that their command was received while keeping the anonymity that hiding the slash command input message gives. In showing the message only for the user who ran the command, it shows them that their command did indeed get sent even if the bot response takes a few seconds.

**Alternati...

chilly siloBOT
chilly siloBOT
#

maybe as a third alternative is having a new permission for roles for bypassing the membership screening.
this could be implemented as:

  1. "bypass screening": When true if a member has the role they will bypass membership screening. (probably true by default)
  2. "require screening": When true even if a member has this role the membership screening will still be required.
chilly siloBOT
chilly siloBOT
#

Description
When a member joins via the Add Guild Member endpoint they don't get a welcome screen and also bypasses the membership screening by having GuildMember.pending by default set to false.

Steps to Reproduce

  1. have a discord account that you can test with.
  2. have a server that has welcome screen and membership screening enabled (if wanted my server can be used for testing this)
  3. join the serv...
chilly siloBOT
#

Description

In a bit of a relation to https://github.com/discord/discord-api-docs/issues/2483, it would be awesome if bots can send ephemeral messages without depending on interactions (think bots that need to migrate, or bots that want to show just the author a result without sending them a DM message). This can be achieved hypothetically by including a context of sorts to which user the message is for (example "original_author_id": "139836912335716352" which would send the ephemera...

chilly siloBOT
chilly siloBOT
#

Description

Rules and public updates channels can't be edited with a bot through API

Steps to Reproduce

Call PATCH /channels/{channel.id} endpoint on a rules or public updates channel (the ID from guild.rules_channel_id or guild.public_updates_channel_id)

{
    "name": "some-new-cool-name"
}

Expected Behavior

I expected the channel to be edited successfully.

Current Behavior

I get an error response (Cloudflare headers snapped):

...
chilly siloBOT
chilly siloBOT
#

Description
Although applications can use any oauth2 scope the certain user has authorized for, currently there is no way for the application to get that list. When getting here access token, a list of scopes is given but it's only the scopes that the user has authorized for this time, while the application can actually use more.

Why This is Needed
Currently we ask for all used scopes on the standard login, but some scopes will not be used for most users. If this is added, we can ju...

#

Description
When a webhook slash command is used and the application has an application icon but not a bot user, the application icon is shown in the type 20 messages but the avatar of the response message is the default Discord logo avatar.

Steps to Reproduce

  1. Have a webhook slash command application which has an icon but not a bot user
  2. Use one of its slash commands

Expected Behavior
The response message avatar is the application icon, just like the message author name is...

chilly siloBOT
#

After some internal discussion, we agree that localization in responses is super important. We will support this in the future, but can't in this first iteration of Slash Commands.

Why:

  • Returning you the locale of the user is currently deemed a privacy issue, as stated earlier
  • If you send us a dictionary of localized strings, we don't have a way to correctly pipe that through our API
  • We don't have support for pre-registering localized strings

The third option on the list is pro...

#

Thank you all for all the responses and feedback you've given us about Slash Commands during this beta period. GitHub is great for tracking issues, but can sometimes be hard at a glance to understand the status of them without digging through tons of comments and swapping between open/closed.

This issue will serve as a "master list" that shows:

  • What we have committed to doing
  • What is still in discussion/decision mode
  • What we are not doing right now, and why

This issue will be l...

#

We are planning to support a permission system for Slash Commands. After talking to developers and some community folks, it seems like being able to set permissions on roles/users is more beneficial for end-users than defining specific permissions on commands. For example, two roles in your server may both have Manage Message, but you only want one of them to be able to use a /delete command.

Our current thinking is:

  • We will support "overrides" for commands, like we do in channels
    ...
#

The article is probably the easier fix

This is what I get for using old screenshots :)

After some internal discussion, we cannot support this right now without some major refactoring of our internal workers. We actually are planning to do that refactor, but it will be sometime mid this year in line with some other planned work.

This feature is on our internal tracker so that it is not lost ๐Ÿ‘

#

This approach does not solve the case for some developers--"I only want people with Manage Server to see this command"--but creating it like our existing permission overrides is more in line with how servers define their permission structure, and has the added benefit of allowing "Only this user can use an admin command in the bot".

Will we be able to define 'sensible defaults' for commands? Say we have a 'nuke entire server' command, it would be pretty bad if anyone could use it. The ...

#

After some internal discussion and discussion with other developers, we will not be supporting aliases for command names.

I think @almostSouji really hit the nail on the head (like, really, words out of my mouth). Aliases were added to fill a need that Slash Commands either circumvent or can support in different wants.

Many bots aliased command commands because it's how other bots were built, and it was easier for users to remember just one thing, even if their code said something else....

#

This will be supported through our proposed permission and overwrite system (https://github.com/discord/discord-api-docs/issues/2315#issuecomment-761131184).

For those looking to turn off all slash commands (other than built-ins), we will also be creating a Use Slash Commands permission. Going to close this issue not because it's invalid, but because it will be solved by other open issues.

#

OK, we've talked about this a lot internally. I am in favor of returning objects, but to an extent, and I'd like to hear more use cases.

It is unlikely that for every object, we would return a full object. The most obvious example is channel or a guild type in the future. Returning the full object would mean returning all role objects as well (either on the guild itself, or channel overwrites).

I'm going to do some thinking and propose what scoped down objects I believe we should su...

#

We will not be supporting /@me for command endpoints.

We talked about this architecture internally. Historically, /@me endpoints have been stood up for when you do not have the ID of your application handy, like:

  • Library developers who need application information and only have a token
  • Getting a user object (/users/@me) when you only have a bearer token

We're not super keen on these kind of "duplicate" endpoints that mirror /<id> routes, but have done so out of necessity...

#

We will not be supporting this right now.

Bots cannot use each others commands, so pulling a list for that use case is unnecessary. I'm not sure I understand why support bots would need to fetch descriptions, considering a user can see descriptions themselves by typing /.

For bot lists, it's an interesting thought, but supporting that particular use case is not within scope of the project right now.

#

OK, talked about this internally and here's where we're at:

  • We still believe that for development iteration, guild commands should be used and will continue to update instantly
  • Global commands will still take up to one hour to roll out, due to what night said
  • We will be creating a read/repair mechanism on using global commands to significantly minimize the chance that a user sends you stale data

What that means is

  • You update your /ban command globally to take a USER ins...
#

We have decided to move forward with supporting server-side validation for arguments. That means that it won't be possible to send malformed data in a command through our API (you still should be signature checking to ensure the command is actually coming from us).

For example:

  • USER will have to be a valid user id (a channel id, for example, would fail)
  • An INTEGER will have to be an integer
  • etc.

Is this request still required if we support server-side validation? My hunch i...

#

I'd want to have at least:

  • Permissions for the guild member in the relevant channel (I see a permissions field in the docs, but is that guild-level or channel-level?)
  • Permissions for the bot itself in the relevant channel (this + member permissions would eliminate the need for caching channels/roles in most cases)
  • The entire user and guild member object (which is already present, according to docs)
  • Channel ID, name, and type (currently only have ID)
  • Guild ID and name (cur...
#
  • Permissions for the guild member in the relevant channel (I see a permissions field in the docs, but is that guild-level or channel-level?)
  • Permissions for the bot itself in the relevant channel (to avoid 403ing tons; this + member permissions would eliminate the need for caching channels/roles in most cases)

If we include a channel parameter, it would be useful to have these fields present in the objects returned for them

#

I work on discord-api-types and I would really benefit from the type being returned as well, as it would let us have a stricter return type that you can check in your code

Here's a barebones example: say the type for the value property is a APIUser | APIPartialChannel | string | number | boolean union (this assumes we get full data in the future, at this time it'd be string | number | boolean) in the returned data. We don't know what ...

#

Description

Due to the fact that global slash commands take up to an hour to roll out everywhere, I would like to propose a field being added when you receive the interaction that contains a user specified version (which can be set when creating/updating the command). Maybe adding something like a command_version value in the payload?

Why This is Needed

Slash commands can take awhile to roll out, this would allow both new and old versions of the slash commands that were upd...

chilly siloBOT
chilly siloBOT
#

This request is a bit out of scope and doesn't quite fit into the model of interactions, so we won't be doing it. Here's why:

From a technical perspective, you are responding to an event sent by Discord, not the user. We plan man in the middle here. So, if you are returning non-200 error codes, we can't differentiate whether or not it's a user issue or a Discord issue (and we should retry). Especially considering we do explicitly want 4XX error codes for other things like signature val...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I apologize in advance that this is not really about the API โ€”ย but when Iโ€™ve contacted Discord support, they have asked me to report the issue here instead. My Discord issue ID is 10056282 titled Discord OAuth Screen: query to disable animation? sent from email sml@royaleapi.com

Description

Our site uses Discord OAuth as login to authenticate user access to certain web-based features. One such feature is our stream overlay intended for streamers to broadcast esports events for...

chilly siloBOT
#

I assume that holds true for the refresh token as well.

I would recommend testing it out, because I'm not sure whether RFC 6749 specifies it either way -- meaning it might be up to how Discord has implemented it. Skimming through, the only relevant bit of the RFC I've found is in Section 5.1:

scope
OPTIONAL, if identical to the scope requested by the client;
otherwise, REQUIRED. The scope of the access token ...

chilly siloBOT
#

@jp9000 thanks โ€” I have checked it out and it does seem faster.

@jhgg Sure you can say that it is related to OBS โ€” but it doesnโ€™t change the fact that if I use the OAuth login with Twitter or Google, I can type on the keyboard, while the OAuth login with Discord is too slow to type.

And there is nothing wrong with the page except that the animation is slowing things down.

While I agree that the animation is nice from a brand perspective for UX, it is currently breaking the UX on slo...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

We will not be supporting /@me for command endpoints.

We talked about this architecture internally. Historically, /@me endpoints have been stood up for when you do not have the ID of your application handy, like:

* Library developers who need application information and only have a token

* Getting a user object (`/users/@me`) when you only have a bearer token

We're not super keen on these kind of "duplicate" endpoints that mirror /<id> routes, b...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description
The Client ID's Discord distributes are fully numerical but over JavaScript integer limit which causes the ID to be changed when it is stored as a Number

Steps to Reproduce

const CLIENT_ID = 800356270543470622;   // The ID of my application
const ID_STRING = '800356270543470622';
const LIMIT_INT = 800356270543470600;   // What JS/Node thinks it is
const LIMIT_STR = '800356270543470600'; // LIMIT_STR but stringified

// will return True, while obviously its...
chilly siloBOT
#

Currently to get the name of a subcommand inside a group you have to do this

Command: ${interaction.data.name}
SubCommandGroup: ${interaction.data.options[0].name}
SubCommand: ${interaction.data.options[0].options[0].name}

However not all commands have subcommands or groups, if you have a command and subcommand with an argument the structure is still the same, however the same code will return the name of the argument as what "SubCommand" is.

There...

chilly siloBOT
chilly siloBOT
#

Description

After either PATCH or POST (with same name) /applications/{}/guilds/{}/commands(/{}) to completely empty the options list, those changes are not reflected in the GET requests to the same endpoint. This is purely an API bug and the Discord client correctly sees the command with no options. I haven't tested this with the global command endpoint.

Steps to Reproduce

  1. Create a command with at least one option by `POST /applications/{}/guilds/{}/comman...
#

Description

Deleting a command causes the Discord client's built-in command list to fail to load.

Steps to Reproduce

  1. Register a command
  2. Delete it
  3. Type / in a place where you would have been able to access that command
  4. Scroll down to the built-in commands
  5. Observe (see screenshot below)

Expected Behavior

The deleted command should just be uneventfully removed from the list

Current Behavior

The deleted command takes the built-in command...

chilly siloBOT
#

Description

Sending allowed_mentions in the interaction response has no effect. I know the docs say not all message fields are currently supported; this is the issue tracking support for allowed_mentions

Steps to Reproduce

Send an interaction response, with a message containing a ping, with allowed_mentions set to none.

Expected Behavior

No ping

Current Behavior

Ping

Screenshots/Videos

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

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I think it would be much better if the HTTPS requests registered only the signatures (name, argument list, and description) of the slash commands, and then have the bot handle auto-completion and argument descriptions. This would make a limit completely unnecessary, as each bot privately stores its own argument list and sends it only when needed, and it would give developers much more freedom in customizing their commands.

The autocomplete information doesn't necessarily have to be updated...

chilly siloBOT
#

Description

When a slash command is registered to Discord, it is sent along with all the data needed for the Discord client to display, describe, and validate the arguments of the command. This data includes things like the argument names, argument descriptions, values for multiple-choice arguments, etc.

I propose moving this responsibility over to the bots so that they themselves store the information about the argument list, rather than Discord. When registering a slash command to...

#

-- @NewDefectus
I think this would be great to have and would provide a new way for bots to interact with the user.

But I think this would be hard to implement, as this would cause way too much traffic: Imagine having a guild with, for example, 30 bots (this is realistic, I have seen servers with much more bots), and a user types in a slash command.
The REQUEST_COMMAND_INFO would be sent to all bots, and the gateway had to wait for all bots to respond, to combine that data, and send ...

#

@angelobreuer REQUEST_COMMAND_INFO is only sent once the user has already chosen a specific command from a specific application. It wouldn't need to send the request to all the bots, only to the bot that owns said command. The command list would be stored the same as before (by Discord, registered through HTTPS), it's just that now, further information about the command is sent from the bot itself, and only when necessary.

About existing implementations, I think having the possibility to c...

#

-- @NewDefectus
Sorry, I have completely misunderstood you. Now my updated thoughts:

I think your idea is good in general and it would be a big improvement as it has a lot of use cases as you previously mentioned and I can think of a lot that would also fit as a use case.

In my personal opinion, I think that having a flag to indicate whether discord should request the argument list from the bot would add unnecessary inconsistency, and I feel some kind of uncomfortable about this alth...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#
Modify attributes of a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object). Returns a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object. Fires a [Guild Member Update](#DOCS_TOPICS_GATEWAY/guild-member-update) Gateway event. If the `channel_id` is set to null, this will force the target user to be disconnected from voice.

consistency; v6 behavior is generally not documented

#

Yeah, an attachment argument type would solve it too. Any way of providing a relevant file/image when executing a command would work, "slash commands in the attachment box" is just what most closely mirrors current solutions.

#2504 could work as a stopgap solution until then?

Yeah I think an attachment argument would be best IMO, it could accept a URL or pop-up a drop-box or something similar like that.

chilly siloBOT
#

Description
When i host a discord bot in Europe we get really high api ping like 140-160ms and when it's hosted in USA we get like 20-30ms

Steps to Reproduce
Start a discord bot in Europe & USA and test the api ping.

Expected Behavior
Roughly the same ping

Current Behavior
Extremly high ping when bot is hosted in Europe

Screenshots/Videos
image

*Client and System Information...

#

Well we are hosting around 200 discord bots. And a lot of people are complaining about it.

well if you want it to be fast it should be physically close to the destination, that's simple logic and how the internet works

And it sounds very stupid that all api traffic is routed to us-east.

discord's servers are in us-east... again, that's just how the internet works

#

well if you want it to be fast it should be physically close to the destination, that's simple logic and how the internet works

I understand how the internet works, But it's really weird that a big company like discord doesn't have api servers distributed around the world.

discord's servers are in us-east... again, that's just how the internet works

I understand that but i don't want to buy servers in the us just to solve a stupid problem that discord is causing.

#

We are homed in us-east for now and the foreseeable future. If you want lower latency, there are 2 possibilities you can try:

  1. Move your servers closer to us-east.
  2. Figure out a way to circumvent the speed of light.

Well then i guess you don't care about people using discord who are living in Europe.

As a developer who uses Discord API frequently, and lives in a former EU member state, I can say that I have no issues with the API Ping. Literally none....

#

We are homed in us-east for now and the foreseeable future. If you want lower latency, there are 2 possibilities you can try:

  1. Move your servers closer to us-east.
  2. Figure out a way to circumvent the speed of light.

Well then i guess you don't care about people using discord who are living in Europe.

As a developer who uses Discord API frequently, and lives in a former EU member state, I can say that I have no issues with the API Ping. L...

#

This issue doesn't warrant further discussion. Nothing said here will change our plans for geographic distribution. In-fact, most services have their APIs homed in us-east due to the incredibly complexity of running a geographically distributed service, and also the fact that us-east is within acceptable latency for most of the users we service.

For regular humans, the difference between 30 and 130 milliseconds is negligible. For applications that perhaps want to reply as quickly as po...

#

If you want Discord to have lower latency in the Europe region, figure out how to make a globally distributed system that needs real time messaging at low latencies. Adding servers in Europe won't solve it, it would still need to communicate with the other regions if they did that to propagate the new events. Yes, the latency to Discord would be lower, but it would make the time to send the message all the same, if not longer due to round trip times and extra time to send the events everywher...

chilly siloBOT
chilly siloBOT
#

It will now create a new type of confusion trying to remember which of the 300 features is in fact using the / prefix and which is using the other prefix.

Your bot does not have three HUNDRED "features" -- it is bloated. Full stop.

Slash commands are available for all bots on all guilds... do you realize how much this will pollute the global scope? Even with the 50 limit (which I think is more than enough), typing "/" will vomit out a list of hundreds of commands for the typical user....

chilly siloBOT
#

Description

Hi there! I wanna to respond to an Interaction that nadled with gateway ws connection. But, when I call api ("/interaction/id/token/callback"), it is returns 404. I respond in max 1 sec, also i tried to ack before responding, but result the same for ack, 404.

Steps to Reproduce

  1. Open gateway connection
  2. Register a slash command
  3. Listen to events
  4. If event is interaction create, get inter. data
  5. Call api for interaction
  6. Get response ...
chilly siloBOT
#

The prejudice against multi-purpose bots really isn't necessary! This is like the fifth time, someone has mentioned this in this issue. Multi-purpose bots have valid use cases just as single-purpose use bots have their use cases. As someone who has both single-purpose and multi-purpose bots, I can tell you that there are users who just prefer the single-purpose bots but a lot more prefer the multi-purpose bots. There are various reasons behind it.

For those that prefer a single purpose, i...

chilly siloBOT
#

Yes, user experience is everything, but that false equivalence you just made is disingenuous @Skillz4Killz

Bots cannot be compared to full scale applications. Your bot, multipurpose or not, is not bound to the same guildelines marketplace apps like Discord are, and to suggest otherwise is minimizes the effort put in by the Discord dev team.

I don't know why you think I'm exhibiting prejudice (we're talking about Discord bots after all...), but the problem isn't with Discord's decision t...

chilly siloBOT
#

Slash commands should be used for the handful, if not only one to three, key selling points your bot has.

I have no idea where you got this from but I haven't seen anything indicating this is the intention; this would just lead to a bad user experience. Slash commands are intended to eventually fully replace the concept of message commands, not just be a way where users can access a few of them.

chilly siloBOT
#

Description

Add FLOAT Application Command Option type.

Why This is Needed

Just like there is INTEGER (4) Option type, we need Float.
Example use case would be convert currency, slow mode command like /slowmode time: 1.5 unit: minute, and maybe some math.
Definitely more use cases out there.

Alternatives Considered

Use String option type and parse & validate it on our side.

Additional Details

Nothing really.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Yeah, an attachment argument type would solve it too. Any way of providing a relevant file/image when executing a command would work, "slash commands in the attachment box" is just what most closely mirrors current solutions.

#2504 could work as a stopgap solution until then?

Yeah I think an attachment argument would be best IMO, it could accept a URL or pop-up a drop-box or something similar like that.

For URLs it should be a different type then, bc URLs aren't attachments...

chilly siloBOT
#

Description
Slash commands Message input would be very useful for a system that users report a message to the moderators. It would function something like this:
You would either reply to a message and do a slash command, and if one of the arguments was a Message, it would populate that with the message ID. Note that this should also accept a Message ID (though it might only search that channel for the specific message ID for simplicity).

Why This is Needed
I would say this...

chilly siloBOT
chilly siloBOT
#

Description

The choices array on ApplicationCommandOption is statically assigned at creation time. There are some use cases where it provide much better UX by allowing choices to be dynamically fetched from the server, e.g. as the in-built /giphy does.

Why This is Needed

While many commands function very well with statically defined choices for options, some commands would greatly benefit both on the server side and from a UX perspective if these option could be dynamically u...

chilly siloBOT
chilly siloBOT
#

Apparently, on Discord, you can't leave notes on other people anymore. You used to be able to right click their pfp, then click "Add Note". Now the actual note adding menu is gone, but the "Notes" section is still there on their profile.

The "note adding" menu is still present on both Discord and Discord Canary, on desktop and mobile. ANd this repository is not a place to submit bugs or feature requests, use http://dis.gd/contact instead :wink:

chilly siloBOT
#

Description

When setting over 16 (the limit) rules in membership screening, the error response is formatted wrong.

Steps to Reproduce
PATCH https://discord.com/api/v8/guilds/:id/member-verification with

{
    "form_fields": "[{\"field_type\":\"TERMS\",\"label\":\"hello world\",\"values\":[\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\"],\"required\":true}]"
}
``...
chilly siloBOT
#

Description

This started at about 4AM UTC on 2021-01-23. My bot can no longer create voice channels with certain permissions.

I suspect it is "deny 'manage permissions'" which is causing the problem, because it is fine without it. Giving this bot the permission in the category doesn't fix the issue.

Steps to Reproduce

  1. Set up a bot ready to fire off a channel creation request, with permissions specified up-front like:
    • @everyone: deny "manage permissions"
    • ...
#

This evening we deployed a breaking change to the Create Guild Channel to address a permission escalation issue brought to our attention.

Permission overwrites in the guild channel creation endpoint are now validated against the permissions your bot has in the guild. Permission overwrites specified in the request body when creating guild channels will now require your bot to also have the permissions being applied.

Setting MANAGE_ROLES permission in channel overwrites is only possible...

chilly siloBOT
#

Setting MANAGE_ROLES permission in channel overwrites is only possible for guild administrators or users with MANAGE_ROLES as a permission overwrite in the channel.

This surely implies that if you have the MANAGE_ROLES override in the channel category, you should still be allowed to create the channel? (Otherwise I'm not sure in what context you could have the MANAGE_ROLES permission on a channel when creating a channel)

chilly siloBOT
#

I have a somewhat old application with a bot account (created in 2017ish) that I tried to register slash commands for yesterday via the gateway (using Discordeno). However, the request constantly returned a 404 when trying to register a slash command. It took me well over an hour of debugging to find the application was at fault - a newly created application using exactly the same code ran as expected. I was under the impression that all applications, old and new, should be able to register a...

chilly siloBOT
#

I see what you are getting at, however, there is a way to check given an interaction.
Whether or not the options parameter is present on each level gives you that information
Basically your pseudcode is this:

on interaction
command = interaction.name
subcommandgroup = null
subcommand  = null
options = interaction.options
if options?.options
  subcommand = options.name
  options = options.options
  if options?.options
   ...
#

Description
When creating a new channel with permission overwrites, there is some strange behaviour after that latest fix when applying a permission to yourself. If you have this permission at guild-level (server settings), the channel is created. If you don't have the permission at guild-level, but do have it on the category that the channel is to be created in, you get a Missing Permissions error.

Steps to Reproduce

  1. Apply a permission overwrite to yourself on a category, but...
chilly siloBOT
chilly siloBOT
#

Description

When attempting to edit a guild command with a PATCH request while including an unchanged name, the API now returns {"message": "An application command with that name already exists", "code": 40041}, where previously it would edit the command and respond with the full command JSON.

Steps to Reproduce

Get all the commands that exist for the guild:

curl -H "Authorization: Bearer [SNIP]" https://discord.com/api/v8/applications/790187789797949441/guilds/61...
#

Setting MANAGE_ROLES permission in channels is only possible for guild administrators

This doesn't seem to be the case in my testing. The bot has MANAGE_ROLES in the category and then can also create channels with that permission.

Bot Permissions (in category): [MANAGE_CHANNEL, MESSAGE_ADD_REACTION, VIEW_CHANNEL, MESSAGE_READ, MESSAGE_WRITE, MESSAGE_TTS, MESSAGE_EXT_EMOJI, VOICE_STREAM, MANAGE_ROLES]
Override(420321485757087746): allow=[MANAGE_CHANNEL, MANAGE_ROLES] deny=[]
O...
chilly siloBOT
chilly siloBOT
#

Alternatively, could a flag in public_flags be used to indicate a terminated/deleted account?

no, the flags are the badges

Some of the flags aren't actually badges, e.g., team user and system, and I don't think the intention for flags was that they are exclusively only for badges.

i don't know about the team, but the system i think is used to tell you that the message is an official message from discord

#

I have a lot of channels, so that is very possible indeed. Would it make sense to also allow users/bots to sync permissions to the category without having administrator permissions? It seems illogical to require administrator just to be able to create sync'd channels. Maybe that would make the rules too complex though, unless a simpler way to created sync channels is implemented like lock_permissions in #1776.

I'd love to see a more nuanced permission in the future since administrator se...

chilly siloBOT
#

Description

The API allows and stores duplicate bits when overriding channel permissions
allow will always take priority over deny in duplicate bits - this can cause some confusion if (let's say) a user has set a permission to allow, but a bot only adds the relevant same bit to deny - the permission does not get changed
obviously the developer is expected to implement this correctly, but life is not that simple

The audit log entry is correct but misleading (as it i...

chilly siloBOT
#

Description

This is definitely one of the more "out there" requests, but I think it'd be incredibly awesome if there was a concept of a service account/guild added for testing.

The service account would be a restricted user account, locked to a single guild hidden in the void, that could be automated via the API to send messages etc., simulating a real user using a bot.

The service guild would be the guild that this service account resides in. I'd envision it being incredibly loc...

chilly siloBOT
#

Description

Missing validation for the "form_fields" field on PATCH guilds member verification (PATCH /guilds/{guild.id}/member-verification) leads to 500s being returned with a generic "internal server error" message in scenarios where a 400 with error message would be expected with more details on how the payload was malformed on V8 REST. The cases I've seen for this happen for cases including when an invalid serialized JSON string is passed for the form_fields field and when...

chilly siloBOT
#

GET /guilds/{guild.id}/member-verification and GET /guilds/{guild.id}/welcome-screen both return 204s (with no payload) when targetting a guild where the relevant resources has never been set before.
This behaviour is inconsistent when compared with how these endpoints return a 200 with a payload when they've been patched then disabled, is inconsistent compared to endpoints such as GET /guilds/{guild.id}/widget which return a 200 with a "empty" or disabled representation rather than a ...

chilly siloBOT
#

Description
When using slash commands, the response message will often be marked in the client as a new message, with the red NEW line and the "1 new message" blurple banner at the top. This does not happen for responses to normal commands.

Steps to Reproduce
Use a slash command many times. The exact times it happens seems to be random but if you use commands enough times you will probably see it.

Expected Behavior
It is not marked as NEW, just like when bots respond ...

chilly siloBOT
#

Whilst we can already do limited forms of testing with two/three bots and allowlisting our main bot to listen to another bot giving commands, this does not work for weird cases such as:

  • A server getting a boost
  • Unusual file upload size
  • Any server features, such as partnered/discoverable
  • Emojis from Twitch
  • Emojis that are not usable because of lost boosts
  • Any flags from the target user - a bit out there but we might want to treat people from various hype squads differently
    ...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I've been prototyping something similar to this with DiscordPHP but still waiting on some of ReactPHP filesystem's dependencies to get updated to support PHP 8. It should be possible to do it directly within a bot without going through discord's API, which is the best possible scenario right now until Discord decides that this is something they wish to pursue. https://sergeyzhuk.me/2017/07/17/reatcphp-http-server/ has a nice tutorial for how to do this already, so on a Linux system it would b...

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

Need this for member.pending as it is bad to have to cache millions of members just to know when a member has passed especially after intents changes made us remove all those members from cache and not rely on cached data. Currently, member.pending is quite useless without this imo and makes it incredibly difficult to deal with especially when this was announced and sent to users as a solution that bot devs should implement
![image](https://user-images.githubusercontent.com/23035000/...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When a bot is already part of a guild and a bot scoped oauth request is received, the permissions requested should be ORed with the permissions already present on the bot role, not replace them.

Why This is Needed

If I detect that I'm missing permissions in general, I can send a url to add those permissions. Currently I need to keep track of the bot's integration role such that I won't lose permissions when asking for new ones if I don't want to request the ...

chilly siloBOT
chilly siloBOT
#

What's going on this week? (OK, it was last week)

We've been hard at work responding to developer feedback on slash commands. A number of slash command related fixes and small improvements have gone out in the last week, with more significant improvements planned. All of these changes have been completed and merged, but may not yet be deployed on all platforms yet.

chilly siloBOT
chilly siloBOT
#

Description

Slash commands with a string/integer choices that contain an standard emoji in the name fail to pass the client validation.

Steps to Reproduce

Have a command with a choices option, and an emoji in the name.

discord.interactions.commands.register(
  {
    name: 'roll',
    description: 'Rolls a die.',
    options: (opt) => ({
      type: opt.integer({
        description: 'The number of sides the die has.',
        choices: [
          {
        ...
chilly siloBOT
chilly siloBOT
#

Is this request still required if we support server-side validation? My hunch is no, but wanted to know if I was missing anything.

Yes! This is more so a request from a library POV. Not so much the validation, rather than resolving types from cache (since you don't really send the user/role/channel data in the request - which would be amazing, but still require us to know what you are sending to properly handle it as a library)

chilly siloBOT
#

That's actually quite terrible UX. The bot invite screen is the same simplified oauth2 flow regardless if the bot is already on the server or not. It'd be majorly confusing for a user to discern if the permissions are being added or set. Setting (replacing) them is definitely the better choice for consistency's sake. You can still auto-fill permission requests with the ?permissions=n query parameter.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I think it would be good to have this listed in #2490 as a suggestion to change the current navigation in Slash-command.
Instead of just typing the command and the Client automatically splitting at one point should be changed to where you f.e. use tab to "select" the command to then go to adding any arguments - if available.

e.g.
Instead of typing /nickname and the client automatically splitting after typing nick resulting in /nick name would you press tab to select the /nick com...

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

Hello, I'm trying to port my new discord library to the browser, after compiling everything to make it work in the browser, I noticed a issue...
I was using fetch to send messages, (via POST) to discord and kept getting this error
image
I am 100% sure that this isn't a problem with my own library because the same code works fine outside of the browser, after doing some research on th...

chilly siloBOT
#

FYI, the websocket does not have CORS, take that as you will (by that I mean: websockets just don't have CORS iirc)... I believe. (I haven't actually tested this).

The reason why that's a thing is because the browser wants to stop a malicious site from possibly reusing cookies. (Legit site sets cookies for requests to itself, hijacker gets user to visit their site which executes fetch('legit site'), using said set cookies).

I'm not quite sure why I started rambling :/

chilly siloBOT
#

Description
In platforms osx is not valid anymore. dispatch wants macos

platforms are the platforms for which the manifest is valid. Most simple configs, like our example, will use the same manifest for win32 and win64, and then make other manifests for osx and linux. However, some older games may need specific configurations for 32bit and 64bit systems, and therefore need separate manifests.

Steps to Reproduce

Expected Behavior
The Variable for osx ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I'm sure discords stance on browser builds is to discourage them.
This started with their domain change to discord.com, it is/was working fine on discordapp.com.

It's one of the reasons discord.js decided to completely drop browser support.

Night only made one statement about it here:
https://github.com/discord/discord-api-docs/issues/2078#issuecomment-697829305
https://github.com/discord/discord-api-docs/issues/1873#issuecomment-671008501

So your changes of successfully conti...

chilly siloBOT
#

Hey everyone, a couple of weeks ago we released Membership Screening, a feature that allows servers to require members to agree to rules before they can talk. As part of this, we also introduced new API support & docs (thx @advaith1 ).

This is an announcement that **we intend to make significant changes to the API specifically related to [getting and editing Membership Screening and the Membership Screening object](https://discord.com/developers/docs/resources/guild#membership-screening-...

#

We ARE NOT making changes to pending members and how that ties into GuildMemberAdd and GuildMemberUpdated. You can continue to use pending=true to add roles or w/e after someone passes the screening.

I'd like to request that changes SHOULD be made to this as well. pending is one of if not the most confusing things to use in the entire discord API right now. The current implementation is also hard on devs as it essentially requires us to cache every single member just to know when...

#

Hey everyone, a couple of weeks ago we released Membership Screening, a feature that allows servers to require members to agree to rules before they can talk. As part of this, we also introduced new API support & docs (thx @advaith1 ).

This is an announcement that **we intend to make significant changes to the API specifically related to [getting and editing Membership Screening and the Membership Screening object](https://discord.com/developers/docs/resources/guild#membership-screen...

#

Hey I was wondering if u can add like an anti alt feature or something so we can easily prevent alts and ban evasion

I believe the scope was specified at the top. This is not in said scope...

Idk how but like ik people use vpn to bypass the ipban but if u can make an alt detector which scans every members ip every 5hours or some

They can stay on their VPN

if 2 people in a server has a same ip they get auto banned but it ignores admins and owners.

So I should get banned for visiting...

chilly siloBOT
#

We ARE NOT making changes to pending members and how that ties into GuildMemberAdd and GuildMemberUpdated. You can continue to use pending=true to add roles or w/e after someone passes the screening.

I'd like to request that changes SHOULD be made to this as well. pending is one of if not the most confusing things to use in the entire discord API right now. The current implementation is also hard on devs as it essentially requires us to cache every single member just to kno...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Are there any news on this?
Has there been an internal discussion, and with what result did it end up with?

This shouldn't be a big issue in general, since official Discord Clients are indeed receiving that information (but maybe using reserved/private endpoints). Exposing it to the API can't be so crititical - like already mentioned, you are able to fetch certain information...

  • how many users are boosting a server (Guild -> premium_subscription_count, premium_tier)
  • how long a u...
chilly siloBOT
#

Are there any news on this?
Has there been an internal discussion, and with what result did it end up with?

This shouldn't be a big issue in general, since official Discord Clients are indeed receiving that information (but maybe using reserved/private endpoints). Exposing it to the API can't be so crititical - like already mentioned, you are able to fetch certain information...

  • how many users are boosting a server (Guild -> premium_subscription_count, premium_tier)
  • how l...
chilly siloBOT
#

When trying to use Slash Commands on iOS Discord App the slash commands is just sent to channel as a regular message and no INTERACTION_CREATE is sent to the bot.

Steps to Reproduce

  1. Register guild slash command
  2. Start typing the command in iOS app
  3. Select the command from the suggestions list and send it

Expected Behavior

Selected commands should trigger INTERACTION_CREATE message sent to the bot.

Current Behavior

The command is sent like a regular me...

chilly siloBOT
#

Description

Limit OAuth guilds.join scope to ask for permission via /oauth2/authorize for each guild.
Otherwise, an application can ask for whitelisting to request guilds.join without specifying a guild.

Why This is Needed

There have been way too many "giveaway" bots tricking users into granting them guilds.join and then adding users to guilds without their express consent. Many of said users are confused and often scared, and don't know what's happening or how to st...

chilly siloBOT
chilly siloBOT
#

Description

On Android client, even if the command with a subgroups has a description it's shown as "No Description."

Steps to Reproduce

  1. Create a command with a subcommand with a description.
  2. Open suggestions for a command

Expected Behavior

The specified description should be shown.

Current Behavior

"No description." text is shown instead of the actual description.

Screenshots/Videos

Android client:
![Android client](https://user-images....

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I think this is a good idea
An idea for how to implement asking per guild:

A new scope guild.join, or something like that where you specify the guild's id, a parameter named join_guild_id which then displays the guild information (like when you view an invite somewhere in the oauth flow.
This would then either add the user to that guild, or allow you to add the user to the guild as normal.

The main problem i can see with this is when the guild doesn't exist at the time of authorisation....

chilly siloBOT
#

Perhaps this could be avoided by introducing something client side.

Eg. A nagbar when you are viewing a guild you were added to, saying something like:
You were added to this guild by X. Click here to unauthorize this application.

Maybe even being able to report the application via said nagbar if the join wasn't authorized by the user. Ideally this would stay till the user dismisses it manually.

Another alternative could be some sort of authorization system built into the client...

chilly siloBOT
chilly siloBOT
#

I'm trying to login with OAuth using the following return urls. I have them typed exactly like this in the portal, even after reloading the page.

https://127.0.0.1:44380
https://localhost:44381
https://192.168.0.117:44382

Only the local host version is working correctly. I've also noticed that the url doesn't match the url that the portal suggests to use:

https://discord.com/api/v8/oauth2/authorize network tab (I think I'm being forwarded here, this url is not in my project)
`ht...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I strongly disagree with this suggestion. Limiting to text channels can significantly limit the functionality of some commands, or completely break them.
E.g. a command that lets you choose a voice channel to join the bot into.

I do agree there is a UX improvement that can be made here that would benefit developers too however.
And this is my proposed alternatives

  • Provide 3 different types of channel selections (more types)
  • Allow text, voice, and category in the choices a...
chilly siloBOT
#

I have looked but hopefully this isn't a duplicate

Description
I think there should be a way to "bulk add" reactions to a message, with a set order.

Why This is Needed

Many bots use reactions as a method of choosing options, polling, setup, page traversal.
They run into rate limits on the API by adding each reaction one at a time. This means bot user interaction is made much slower and more frustrating for the user.

Alternatives Considered

Another consideration ma...

chilly siloBOT
#

Description

Attempting to add a bot with the webhook.incoming scope, whether or not it is with other scopes claims to complete successfully and generates the code. However, upon inspection in the client, there is no webhook for the selected channel, adn the integration does not appear in server settings.

Steps to Reproduce

  • Generate a test application
  • Go to the Oauth page with any combination of scopes that includes webhook.incoming
  • Complete the flow
  • Go into the...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Are there any news on this?
Has there been an internal discussion, and with what result did it end up with?
This shouldn't be a big issue in general, since official Discord Clients are indeed receiving that information (but maybe using reserved/private endpoints). Exposing it to the API can't be so crititical - like already mentioned, you are able to fetch certain information...

  • how many users are boosting a server (Guild -> premium_subscription_count, `pr...
chilly siloBOT
#

Description
When joining a user to a guild via a PUT request to /guilds/:guild/members/:uid, the result is a blank 204 every time, even where the user was not previously a member of the guild.

Documentation:

Returns a 201 Created with the guild member as the body, or 204 No Content if the user is already a member of the guild.

Steps to Reproduce

  1. Obtain OAuth2 access token (with `guilds.join...
chilly siloBOT
#

Good Morning to all Discord Employees,

I recently found a bug in your platform. In my opinion it's not a huge deal. However when you are setting your custom status and you opt for Donยดt Clean, after one or two days of use it disappears. I found this bug when I was watching a livestream of a friend of mine and in my display I had the custom status but on his i didnยดt. That already happened to me quite some times, and it is a bit annoying.

Another bug: When you open discord on your Phone ...

chilly siloBOT
#

Description
When going to an OAuth2 authorize URL with the applications.commands.update scope, it returns an "Invalid scope" error and does not allow the user to authorize the application.

Steps to Reproduce
Go to an OAuth2 authorize URL that includes the scope, for example, https://discord.com/api/v8/oauth2/authorize?client_id=159799960412356608&scope=applications.commands.update

Expected Behavior
It redirects to the authorize page where the user can authorize the appl...

chilly siloBOT
#

Description

GitHub issues with long titles (over 256 characters) are not posted with a webhook.

Steps to Reproduce

  1. Make a webhook and copy its URL
  2. Add the webhook to a GitHub repository
  3. Make an issue on that repository with a title that is longer than 256 characters.
  4. See the issue

Expected Behavior

I expected the issue to be posted with a webhook, with the issue title cut so that I can still know that the issue was made on the repository.

**Current...

chilly siloBOT
#

Description
Some GUILD_MEMBER_UPDATE events do not seem to include the pending field.

Steps to reproduce
The pending field is missing when any user changes their avatar/profile picture (from my debugging at least)

Expected Behavior
The pending field should be included as per https://github.com/discord/discord-api-docs/pull/2396#issuecomment-756429781

Current Behavior
The pending field doesn't get included

Log received from the gateway:
`{"t":"GU...

chilly siloBOT
chilly siloBOT
#

These changes are not yet deployed, so this PR is intended as a heads up!

Soon we'll be adding the ability for users to invoke your bot's global slash commands within a DM. Due to that change, some of the fields on the interaction object have been made optional. For example, guild_id is optional because you would not receive one in a DM interaction.

However, the behavior of slash commands within guilds today remains unchanged.

We've also added a user object to the interaction pay...

#

We currently aren't planning on bumping this to 2 because it's....breaking ish? It is a breaking change specifically for commands that happen in DMs, but commands in DMs is not something that is supported until we roll out this code. And this behavior does not change for guild commands (the interaction payload you receive from a guild today will still have all the same data).

We are still in a beta so we can make breaking changes, but we also will coordinate with developers and maintai...

#

In all existing use cases, you will get a channel ID. This is more of a future-proofing thing. For example, if we allowed bots to add options to context menus, you may be able to add an interaction by right clicking on a guild or a user, in which case that might not include a channel ID.

I say might not because none of that stuff exists yet, so again this is more future-proofing. In both guild commands and DM commands, you will get a channel id.

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

Description

Add an API for mass moderation of any kind of group chat on Discord: guilds, lobbies and group channels.

Why This is Needed

Automoderation bots on Discord currently relying on subscribing to messages and reading them as posted. This causes a trust issue for those bots. In addition, developers of some bots, such as MEE6, refrain from transistioning to new interaction API as they need to read messages anyway.

Alternatives Considered

A specific user or bot...

chilly siloBOT
#

I feel like this would be more a burden rather than a nice feature. Any filter system would rely on message events either way and your proposal could potentially cause extra latency when sending messages. The only thing I like about what youโ€™re suggesting is the ability to subscribe to a user specific event, however even this is already doable with the current system with some simple checking.

chilly siloBOT
#

Any filter system would rely on message events either way and your proposal could potentially cause extra latency when sending messages. The only thing I like about what youโ€™re suggesting is the ability to subscribe to a user specific event

You misunderstood my proposal. In my proposal, the filtering would be applied server-side before the event gets propagated to any other users. So, it would appear perfectly transparent to users, no remove/edit message events will be generated out of ...

chilly siloBOT
#

@night this is not about the bot sending itself a message.
It is about the bot getting notified that he sent a message.
I for example use this in a bot to add a wastebasket reaction to any message that was sent by the bot.
It is a perfectly valid use-case to listen to own messages.
Also think about a bot that is implemented in microservices style where there are multiple instances of the bot running and each instance cares about a specific task only.

chilly siloBOT
#

My idea of a possible design from such an API:
-Moderation rule create
--Moderation word and context add (per guild/lobby/group chat, but shareable)
--Moderation pretrained corpus add (per lobby/guild/group chat, but shareable)
--Moderation blacklisted work add (global)
--Premoderator add/update/remove (per guild/channel)
-List moderation rules
-Retrieve moderation rule
-Moderation rule enable/disable (pretrained corpus/word filter only, work filters are append only)
-Add/update/remo...

chilly siloBOT
chilly siloBOT
#

This PR documents missing audit log change keys, and adds an info block related to keys that get reset

There's also supposedly a reset one, however I've been unable to get it in REST results. It should come from resetting an overwrite's permission to neutral, however the API seems to just send allow/deny instead

I'd like some feedback on the info block, as the wording may be inaccurate

chilly siloBOT
#

I believe libraries are already able to resolve type information using generics, no? I think Pylon, for example, does this already. I'm curious why a union type would be preferred when its type is based upon the configuration of the command. If you define the command expects a string, its input type will be a string.

Because you cannot guarantee the same type strictness in the reply, or the payload you get via WS or webhook, without having some common property. We cannot just say `oh y...

chilly siloBOT
chilly siloBOT
#

Description
Using a slash command with parameters returns a 400 error

Steps to Reproduce

  1. Use a slash command with params (example: /command thing: string param)

Expected Behavior
The client should successfully POST to /interactions

Current Behavior
The API returns a 400 "Invalid Form Body" error

{
  "code": 50035,
  "message": "Invalid Form Body",
  "errors": {
    "...code": "BASE_TYPE_REQUIRED",
    "...message": "This field is required"
...
chilly siloBOT
chilly siloBOT
#

You could also have different instances running on different hosts for sharding and whatnot.
And it is an unnecessary effort to require to make them speak to each other if it is not present anyway just to distribute information Discord is already distributing by sending the event.
#184 also suggested that in the MESSAGE_CREATE_EVENT the channel information will be included in the future.

chilly siloBOT
chilly siloBOT
#

This would be incredibly useful. Currently there's no way to know what guilds have slash commands regestered to them and this could end up in old, unusable, commands existing.
And I don't think that keeping a internal log of what guilds is going to work either.
I also help out with an extension for slash commands and it's something we're trying to figure it how to do (keep all guilds up to date) and we can't do that without an endpoint to get all guilds with slash commands.

chilly siloBOT
#

Hey hey hey! Sorry for the late update. Here is what we've accomplished last week and this week in the world of Slash Commands. Last week was mostly bug fixes because there's some big stuff coming soon ๐Ÿ‘€

  • Feature: Support for global commands in DMs - docs & client changes coming soon
  • Improvement: Android displays full command used
  • Improvement: Arguments are validated on server side
  • Fix: Choices named like channels/mentions are invalid (https://github.com/discord/discord-api-docs...
chilly siloBOT
#

A request for the ability to get an integer representing the total number of messages sent either in a channel or by a user.

This seems necessary as the only current method to do this is incredibly inefficient and slow, as you have to loop through each message separately. Talking with other developers has revealed that they are also annoyed with this system.

Personally, I've created a progress bar which increases with each message iterated through for a member. However for this progress...

chilly siloBOT
#

Description
The restriction of the applications.commands.update scope to the client credentials grant broke a feature I made that displayed a list of bots' slash commands on a webpage. Since my use case only involved reading and not editing, it would be useful to have a read-only command scope that is available in standard OAuth. I don't think read-only access would be a security risk since it is info accessible by any user.

Why This is Needed
Applications using the update sc...

chilly siloBOT
chilly siloBOT
#

Description
When providing embeds for the webhook to be sent through a POST request, if you provide up to 10 embeds that all have lower than 6k character limits for the fields listed here but if all of the embeds you send add up to 6k characters total it errors out..

Steps to Reproduce
Make a POST request to send a webhook, then create up to 7-8 embeds that are just under the 6k embed-character limi...

chilly siloBOT
#

Description

it would be nice to allow users to specify a Date or time delta. Discord already has a date picker (though possibly not a date & time picker) would be fantastic if we could use that.

Why This is Needed

Lots of commands schedule things it'd be very useful for those. For example I have a command to create events for a specific date. Right now users have to type out the time zone, which is super unfriendly.

Alternatives Considered

Right now we can allow...

chilly siloBOT
chilly siloBOT
#

Description

When using option type 4 with Slash Commands, a user inputting a very large integer will find that the number entered does not match the number processed by Discord. Sometimes this results in off-by-one errors, although I have seen larger differences between in and output.

Steps to Reproduce

  1. Create a Slash Command that takes in an integer.
  2. Run the command with a large number, e.g. /test 11111111111111111
  3. Observe the result returned

**Expected Behav...

chilly siloBOT
chilly siloBOT
#

My memory isn't nearly filled up now, and I can relatively consistently reproduce the problem. It appears the garbage collection happens deeper in the code. It is really like the error message said a problem with FFIMethods. I don't know exactly what though. Might be the problem lies on the unmanaged side, so the DDL, and then I can't fix it. Does anyone have a clue?

If I really keep getting trouble, I guess I could try switching to C++/CLI, but I would prefer if I can make it work with ju...

chilly siloBOT
chilly siloBOT
#

Description
When people are joining your discord server i only get information about the user
as it says here
https://discord.com/developers/docs/resources/guild#add-guild-member

It should have the invitation code here as well when they join
access_token
nick
roles
mute
deaf
invite_code

Why This is Needed
I want to know more easily who joined on which invitation code
Because now every invite is deleted when the user joins when only ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

The fail_if_not_exists parameter does not error as expected when not passing a boolean.

Steps to Reproduce

  • Send a message with message_reference to a valid message_id.
  • Set fail_if_not_exists in this message_reference to a string, such as 'test'
  • Send the message again
  • Set fail_if_not_exists to a snowflake string
  • Send the message a third time

Expected Behavior

The API errors with: Value 'test' is not boolean.

Current Behavior

The AP...

chilly siloBOT
chilly siloBOT
#

Description

As it stands, the current limit on multiple-choice arguments is 10 strings. I suggest that this limit be raised higher, to allow up to around 50 or perhaps 100 choices.

Why This is Needed

While I understand the UX motivation behind limiting the choice list, there are some use cases where this limit does more harm than good.
As an example, imagine you want to add a slash command that translates a given text to another language. You've got a really good system that can tr...

chilly siloBOT
#

Description
When a slash command is selected in the client when text is typed it will automatically select and input to the first option, but when pasting text with over 2 characters, the option is not selected and the text is ignored when the command is sent.

Steps to Reproduce

  1. Select a command with options in the client
  2. Make sure the option is not selected
  3. Paste text

Expected Behavior
It automatically goes into the first option, like when typing:
![image](h...

chilly siloBOT
#

Description
When there are multiple applications that have a command with the same name, the iOS app always selects a certain application's command, even if the user selects a different one.

Steps to Reproduce

  1. Have multiple applications in a server with commands that have the same name
  2. Tap the commands

Expected Behavior
It selects the command you tapped

Current Behavior
It always selects a certain application's command

Screenshots/Videos
![image](ht...

chilly siloBOT