#github-notifications

1 messages · Page 34 of 1

chilly siloBOT
chilly siloBOT
#

Description

You can send X-Audit-Log-Reason along with creating a guild scheduled event and with updating a guild scheduled event. This, of course, is not documented. (deleting a guild scheduled event seems to not take this header into account)

Steps to Reproduce

  1. send the X-Audit-Log-Reason header when making a request
  2. it shows up in audit log

Expected Behavior

Documented behavior happens: most routes that take audit log headers are documented so it is ex...

chilly siloBOT
#

It is a fairly common pattern to use something like https://api.example.com to host an API endpoint independent of other web content associated with a domain. If I put a third-level-domain into the INTERACTIONS ENDPOINT URL field on an Application's General Information page, it resolves example.com's IP address instead of the IP address of the API server. This happens with Host (A/AAAA) records, so it is unlikely using alias or similar records will resolve the issue.

This behav...

chilly siloBOT
#

Error

{
"guild_join": "{"message": "401: Unauthorized", "code": 0}"
}

Code

@app.route('/join')
def join():
    discord = make_session(token=session.get('oauth2_token'))
    user = discord.get(API_BASE_URL + '/users/@me').json()['id']
    at=session.get('oauth2_token')['access_token']
    response = requests.put(url=API_BASE_URL + f'/guilds/***/members/{user}',
    json={'acess_token': at},
    headers={"Authorization" : f"Bot {at}",
    "Content-Typ...
chilly siloBOT
chilly siloBOT
#

A hacker, simply needs a user's token to login and run all the dangerous stuff. No 2fa even required.
Nowadays, there are many scam on discord dms too, where hackers (and hacked accounts) ask you to download and test their game. On running it, the app will simply copy your token and send it to their servers.
Great. Literally the easiest and best way to bypass 2fa is to use user token itself.
In this case it was a testing app by a hacker, but what if, it was an fake antivirus or anything li...

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

Locking tokens to an ip address is probably not a good idea as people on smartphones or connecting their computers from multiple locations (eg. home & school) would have to constantly re-login.

About locking the token to a device ID... well how do you get the device ID? By sending it in the request. So if someone can obtain the token, they can probably also obtain the device ID, and fake it when making requests.
Some services do that sort of fingerprinting (eg. locking the token/session t...

#

connecting their computers from multiple locations (eg. home & school) would have to constantly re-login.
rather this than have my account stolen...
Seems discord are constantly playing cat and mouse with people writing malicious token stealers, some of them very sophisticated. This would at least make that sort of attack much more difficult.

#

Locking to IP only would also cause problems for anyone (most people) that have dynamic IP addresses. Imagine the lease on the IP resetting and now all your tokens are invalid for you.

I personally don't see much reason in adding these additional restrictions as it should be common sense not to share your token, and these restrictions really won't do much against most types of attacks. Don't click links or install/download/run things you don't know/trust. Not too mention, its only discord,...

#

Don't click links or install/download/run things you don't know/trust. Not too mention, its only discord, its not a banking account where an attacker could get your financial information.

You assume here that every user of discord is like you or I, and knows not to run random things. The fact this discussion is being had shows that it is an issue and needs addressing. No other platform i use takes a lazy attitude to 2FA. I'm pretty sure i cant just clone my phones settings to another pho...

#

Honestly its hammered into people not to click untrusted links or download untrusted files. This should be as obvious today as not touching boiling water. Ever been told about "stranger danger"? That applies on the internet as well.

As for the other claim, no, you can just copy session cookies from one device to another and they will work. The only places that won't be possible would be some sort of high security application like banking. I can do it right now with my google and github acc...

chilly siloBOT
#

Description

When joining a server on mobile, and not completing screening you see Normal (CTA) buttons as "clickable" but get the "Channel verification level is too high" message when trying to interact with them. (This message is a bit confusing.)

Steps to Reproduce

Join a server with Normal (CTA) buttons on its welcome screen via the mobile app, and membership screening enabled. You will see the buttons as available trying to interact with them will give you...

chilly siloBOT
chilly siloBOT
#

Description
When adding Slash Commands to a guild with only application.commands there is no audit log entry created.
When removing the Slash Commands an audit log entry is created.

Steps to Reproduce
Add Bot with applications.commands scope(no bot scope)

Expected Behavior
audit log with integration create pops up

Current Behavior
No audit log entry is being created

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

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Don't click links or install/download/run things you don't know/trust. Not too mention, its only discord, its not a banking account where an attacker could get your financial information.

You assume here that every user of discord is like you or I, and knows not to run random things. The fact this discussion is being had shows that it is an issue and needs addressing. No other platform i use takes a lazy attitude to 2FA. I'm pretty sure i cant just clone my phones settings to anoth...

chilly siloBOT
chilly siloBOT
#

Oh sick, where? Never seen it

@isaackogan The act of changing your password resets your token. So it would be the "Change Password" button you're looking for :)

Didn't know, very cool! Isn't that a bit unclear for the end user? Though I guess token stealing isn't exactly normal use. Willing to bet most people aren't getting helpful advice in GitHub threads though. Still awesome to know so ty.

chilly siloBOT
#

I'm also confused on why it's bad UX. Some commands have other ways of showing success, eg. a context menu command that adds a reaction to the message it was used on. Not having to respond to an interaction also makes it possible to DM the user something, so that an ephemeral message wouldn't have to be used for private information (or responses that users may not want to clog the channel with, but do want to keep). For some clients, responding to a slash command can also scroll the chat al...

#

There should be some sort of response to confirm it worked. There's plenty of use cases where multiple things are getting changed where there's multiple failure points (eg, creating a role and adding an override to a channel for that role). Arguing that "well the user can just see that it worked" is not great. What if only half of the operation worked? The user may see that something has changed and assume everything is done/complete/successful.

Whether that confirmation response is a me...

chilly siloBOT
#

I suppose my argument is more against having to respond via message, rather than having another way to respond. A toast would be nice, or something smaller that's not going to disrupt the flow of commands. You're right that a success (or failure) indicator of some kind should exist, but it really shouldn't be limited to just a message, especially when native parts of the app use toasts and other indicators (and it's clear that Discord is trying to make bots more integrated to native functions)

chilly siloBOT
#

It would be really nice if we were able to get voice states through the REST API instead of only receiving them through the gateway, it could possibly be behind a boolean query string flag /guilds/{guild.id} allowing only those who want it to get it.

This would be super useful for bots that want to use interactions via an incoming webhook instead of the gateway.

chilly siloBOT
#

What if discord provides additional security like how it asks for 2fa again when I'm deleting servers or changing password, if discord sees that I'm either sending a lot of frnd req or blocking a lot of people (when someone is hacked, this happens) discord can lock up that token and ask for 2fa in order to continue. If the user fails to provide it, notify the real user via email that their account is compromised.

I once saw Facebook doing this: my father's account was once logined to an di...

#

Oh sick, where? Never seen it

@isaackogan The act of changing your password resets your token. So it would be the "Change Password" button you're looking for :)

Didn't know, very cool! Isn't that a bit unclear for the end user? Though I guess token stealing isn't exactly normal use. Willing to bet most people aren't getting helpful advice in GitHub threads though. Still awesome to know so ty.

It would be really cool for a button on user settings to reset tok...

chilly siloBOT
#

This discussion board is for API suggestions and feedback, and this post doesn't really fall under API talk, so it's now locked.

To OP's point, as far as I'm aware the only way to extract a token is to compromise the machine with Discord installed. Unfortunately, once an attacker's code is running with user privileges, it follows that they can do anything you can do. Discord continues to take steps to limit the spread of malicious software and to mitigate the impact of stolen tokens.

#

This discussion board is for API suggestions and feedback, and this post doesn't really fall under API talk, so it's now locked.

To OP's point, as far as I'm aware the only way to extract a token is to compromise the machine with Discord installed. Unfortunately, once an attacker's code is running with user privileges, it follows that they can do anything you can do. Discord continues to take steps to limit the spread of malicious software and to mitigate the impact of stolen tokens.

chilly siloBOT
#

It's awkward enough having like one other spot in the entirety of the docs that could be a string, or an integer, or non-integer number. I may correct it later. It took far too long to find this issue. Leaving it defined as a string is the perfect balance of chaos, given it's not quite accurate, but at least it's not an object. 😈 Thanks for the note, adv.

chilly siloBOT
#

I doubt if It's 1:1 API related nor discussions can be used for asking questions but there is no place else to ask so I am here.

What is the role of video metadata at embedding videos. I realized somethings were wrong when I posted some videos from some Telegram channels, where metadata erasing is common. On my iPhone they were failing to be properly saved on gallery so I used image selector to send on Disxord. After I posted the videos, They were surprisingly slow at playing in both discord...

chilly siloBOT
#

On cdn.discordapp.com/emojis/..., it would help if Discord could expose a hash for emojis. This hash could be exposed through the response headers (x-hash-md5 for instance).

Bots which need to perform analysis on the image content would find this useful, as they could simply HEAD the object and detect if it had already been processed, saving bandwidth and CPU processing. If it had not already been processed, then it can do another request to download the image content.

Currently ...

#

In an example call, I don't see any etag:

curl --head https://cdn.discordapp.com/emojis/674758248506851379.png

HTTP/2 200
date: Tue, 14 Dec 2021 17:38:21 GMT
content-type: image/png
content-length: 17817
expires: Thu, 13 Jan 2022 17:38:21 GMT
last-modified: Wed, 05 Feb 2020 23:28:22 GMT
cache-control: public, max-age=2592000
x-envoy-upstream-service-time: 1
access-control-allow-origin: *
cf-cache-status: MISS
accept-ranges: bytes
expect-ct: max-age=604800, report-uri="ht...
#

On cdn.discordapp.com/emojis/..., it would help if Discord could expose a hash for emojis. This hash could be exposed through the response headers (x-hash-md5 for instance).

Bots which need to perform analysis on the image content would find this useful, as they could simply HEAD the object and detect if it had already been processed, saving bandwidth and CPU processing. If it had not already been processed, then it can do another request to download the image content.

Currently ...

chilly siloBOT
chilly siloBOT
#

I would also like to see this capability. As a minimum, allow setting one of the subcommands (without any required arguments) as a 'default' to run in the event that no subcommand is provided. This is important to me to provide an interface much like a CLI command works, where the main command does something default (even if it's just to provide help) and then options or subcommands (or both) can be added to the end of the command to modify its behavior.

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

Description
Bots cannot change their own nicknames in guilds despite having the right permissions. On attempting to do so, it fails with a 403 Forbidden: Missing Permissions

Steps to Reproduce

  • Ensure that a bot has the permissions to change their nickname in the guild you will test this in. (Give them the Change Nickname permission in case they don't. I tested with Admin permissions in the demo, but it also can reproducible with the Change Nickname permission.)
  • T...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

some things are better in DMs, though. bots that show private information should probably send you that info in DMs for example, regardless of where the command is sent, and sometimes that private info is something the user wants to keep access to so they don't have to keep using the command (/rely on the bot being up) every time they want access to it

another example: form bots. modals are cool and all, but they're very limited in terms of form bot functions right now, what with a max of 5 ...

#

I think if DMs are allowed as a response to an interaction, there should be some sort of indication to the user that the bot has responded via a DM (maybe similar to an ephemeral message saying ‘<bot name> has DMed you’ and with a link to the DM message).

I do see the benefit of having bots respond via DMs to send private information that the user might want to refer back to in the future (so it can't be just an ephemeral message), but I think the best solution now is to respond with an ep...

chilly siloBOT
#

tbh i just think it would be nice to have multiple ways to respond to something in general. ephemeral messages still can cause issues like scrolling away from where an interaction happened or being redundant. it's not good to completely remove things like success or failure indicators, but it'd be nice to have more flexibility when it comes to responding. all responses focus on creating or editing messages only- like before now, bots could just react to ack something, but we don't have that n...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Has there been any progress towards a resolution? Interaction Responses should inherit all non-destructive permissions from their bot's integration role. Not having the ability to issue responses containing emotes or proper mentions breaks functionality that exists in the message replies to non-integration commands.

With the deadline still months away, but rapidly approaching, I'd like to release slash commands to my users long before the cutoff window. I cannot do that as things current...

chilly siloBOT
#

Description
The gateway sends the initial hello payload, an ack heartbeat then immediately after another hello payload. I found this by complete accident when I was updating Sword for the v9 API. As this library uses the v6 API, it did not require intents to be sent on the identify payload. Adding the intents key to the payload fixed it, but the reason I am reporting is that I believe this should throw an Invalid Session (OP code 9) payload, not ano...

chilly siloBOT
chilly siloBOT
#

should we reword the description to something more like:

"when the user's timeout will expire and the user's interaction in the guild is re-enabled. null if the user is not timed out."

timeout / timed out / timing out was avoided internally to keep the fields more generic and b/c timeout is an overloaded term, but it could be clearer to use timeout / timed out terminology at least in the descriptions here where we have more context, for the sake of having easily understandable d...

#

Discord added a permission for managing guild time outs - I've never documented permissions, but I assume it should be documented as 1 << 40 (don't quote me on this)
image

The new permission seems to be named MODERATE_MEMBERS = 1n << 40n

This is correct, a new MODERATE_MEMBERS = 1 << 40 permission was added to gate the ability to set and clear user timeouts. Wou...

chilly siloBOT
chilly siloBOT
#
  • Missing payload info

    • Wrong formatting of table

    • Misplaced attachment object

  • I hyperlinked the exact payload for attachments
  • When you want to have a link in a table the formatting is 100% gonna be messed up, many tables are formatted in this same way (see screenshot below)
  • What do you even mean by "Misplaced attachment object". I linked the attachment object
    <img width="933" alt="Screen Shot 2021-12-18 at 1 26 00 AM" src="https://user-images.githubuse...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

oh I see where the issue was in needing to maybe worry about longs, my fault for not catching this in my previous review, sorry. This can be tricky because the previous permission value is 0x8000000000 and now with 1 << 40 we ran out of digits with the previous formatting here didn't we :)

I think we can just document the new value as is: 0x10000000000 (1 << 40). This will probably make it slightly misaligned with the rest of the column so if we are worried about that we could probably...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

When adding an image to an embed, the image is currently always rendered at the bottom of the embed, below the text content.
Depending on context however, this isn't always the most aesthetically pleasing position.

To allow for more flexibility when designing custom embeds, I am proposing an additional optional parameter for the embed image structure that specifies the positioning of the image in r...

chilly siloBOT
#

For example if my IP address was 69.42.06.942 then I could optionally bind my bot to that IP address through the developer portal.

By "binding" I mean making it so that any requests with the Authorization header as the bot's token would ONLY be accepted if they were from said whitelisted IP address, otherwise they'd be rejected with a 403 - Forbidden.

This is a great way of preventing disaster from token leaks as no one else would be able to request from the token, because Discord o...

chilly siloBOT
chilly siloBOT
#

For how long are attachments from command options available on the CDN? I think if there is a time window, that should be mentioned in the docs.

This is a good question however I am unsure about this myself as I have not been able to successfully send an attachment due to this feature not being implemented in the discord client yet. Hopefully a staff member can enlighten us?

chilly siloBOT
#

I tested this, and it looks like the actual behavior is that the socket closes with close code 4013 (invalid intents). I would assume you get another HELLO because the library reconnects. The closing of the socket is intended behavior, and a library should not re-attempt the connection if the intents are invalid.

Invalidate session (OP 9) is for cases where a session no longer exists. It usually implies something like the gateway identify limit, or a failed resume.

chilly siloBOT
chilly siloBOT
#

All channel inputs in slash commands are validated by the API itself, you don't need to worry about the user sending in an invalid channel.

They can't be filtered though. API will check the channel exists, but not if the user can manage it (if user has specific permission in a given channel), or even if the channel is disabled in bot settings itself (in my bot, you can set permission to use command per channel per role, and that can't be done in API nor I saw any plans on adding th...

chilly siloBOT
chilly siloBOT
#

Description

When I time someone out, the audit log member_disconnect is called, I'm aware that timeouts kick the user if they're on a voice channel, but if they're not, the audit log event is called anyway.

Steps to Reproduce

  1. Time someone out.
  2. Check audit logs.

Expected Behavior
Don't call member_disconnect audit log event if the user isn't on a voice channel.

Current Behavior
It's called regardless of whether they are on a voice cha...

chilly siloBOT
#

Description
The permissions list in the OAuth2 General tab for adding a default authorization link does not include the Moderate Members permission

Steps to Reproduce

  • Open the applications page
  • Select an application and go to the OAuth2 tab
  • Select In-App Authorization as the authorization method and select the bot scope

Expected Behavior
The Moderate Members permission is present and can be selected

Current Behavior
The permission is not there

*...

chilly siloBOT
#

The client seems to call the 1 << 40 permission "Timeout Members" instead of "Moderate Members". Will this be changed in the docs?

Good catch. To clarify: the permission name internally and for the purposes of the api is MODERATE_MEMBERS, with the intention that we keep it less specific to potentially allow additional future moderation actions to be grouped under this permission. You are right in that the client UI does currently refers to this as "Timeout Members". This was an inten...

#

Good catch. To clarify: the permission name internally and for the purposes of the api is MODERATE_MEMBERS, with the intention that we keep it less specific to potentially allow additional future moderation actions to be grouped under this permission. You are right in that the client UI does currently refers to this as "Timeout Members". This was an intentional choice to make the settings UI clearer for users. The idea is in the future if additional actions are grouped under this permission...

chilly siloBOT
#

With this feature being released, I'll be marking this PR as ready to be merged.

Thanks, we'll take one more look at this a bit later and get this merged in today.

It should be documented how long one can set a timeout for. From personal testing, it appears to be 5 weeks but it might be smarter to get an exact time from someone who works with the API.

I thought I saw max mentioned in this PR earlier, might have gotten lost after some of the suggestions I made re. descriptions. se...

#

Honest question: if the UI shows it as "Timeout Members", would it be wrong to not keep a similar name for consistency reasons with the API as TIMEOUT_MEMBERS? All of the other permissions are kept generally 1:1 in naming with the API and UI because of (reasonably assuming) consistency and avoiding confusion. MODERATE_MEMBERS as the permission for timeouts in the API does add a slight amount of confusion imo as @MinnDevelopment mentioned. I think the actual naming of the permission is...

chilly siloBOT
#

ah to be honest the optionality of fields from the perspective of the public api is always a tricky question to answer definitively. b/c the objects we define in the docs are defined more for convenience, so they can be referred to from other places in the docs rather than something that always maps 1:1 to how we use models internally. I think the best answer I can give is when we serialize the guild member model, we currently always seem to include the communication_disabled_until field. T...

chilly siloBOT
#

since from a pure data model perspective communication_disabled_until isn't a core field for the member model like joined_at is, how about we leave it as optional just in case, since I'd imagine the opposite -- assuming it is required now and at some point in the future an endpoint whose document references this Guild Member Object in docs fails to include this field -- is a worse developer experience. What do you think?

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

The problem

Other bot creators that I know and I have run into the issue where the bot could not assign or edit a role above the bot's top role. Most robust bots will have an error message telling the user that this is impossible. The problem is that the user would need to retype the command, which could be quite an annoyance.

Functionality

I'd love to have a way to enforce the role position of the bot. Meaning, if a user tries to pass a role with a higher position than the top bo...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

overall i don't find think this is a useful addition:

  • changes to the api are breaking if they change existing documented behavior, which is already self-apparent. i don't think adding further qualifications is useful since they could be broken in the future.
  • random html responses from our upstream providers (cloudflare or otherwise) would be part of outages, which are almost by definition not documented behavior.
  • the documentation also already states that correct user agents are co...
chilly siloBOT
chilly siloBOT
#

Description
When the timeout automatically ends it doesn't send a GUILD_MEMBER_UPDATE event.

Steps to Reproduce

  1. Listen to the event
  2. Timeout a test account
  3. Wait for it to automatically end.
  4. The event doesn't fire

Expected Behavior
To send communication_disabled_until: null when the timeout automatically ends.

Current Behavior
It doesn't fire the event.

Client and System Information
API: v9
Gateway: v9

Note
The event does fir...

chilly siloBOT
#

the reason this is happening is because we don't go out of our way to change the communication_disabled_until field once the timeout naturally expires, so there is no update. We let the value continue to be the existing datetime which is now in the past, and since the user is only timed out until the communication_disabled_until value, a datetime in the past means no longer timed out

chilly siloBOT
#

This makes sense on the client side, it makes logging for bots much more involved though. There is no audit log entry on timeout expiry, and there's no event, so we basically have to track the timeouts manually like we did when we did it with roles. I wouldn't necessarily consider this a bug, but I would like this to be changed or rectified in some other manner.

chilly siloBOT
#

Description

When utilizing allowed_mentions to prevent mentioning the replied user in a reply, you must also specify other allowed mentions.

Not sure if this is intentional design behavior, but it feels unintuitive to me.

Steps to Reproduce

POST a new message to a channel with a mention, with allowed_mentions: { replied_user: false } (it does not actually need to be a reply, also the replied_user key can be literally any other invalid key)

**Expected Behav...

chilly siloBOT
chilly siloBOT
#

yea I agree the current implementation doesn't allow for the best dev experience for those of you who want to be able to react to timeout expirations easily. Realistically based on what would be involved here and current priorities for the timeout feature, I am pretty sure support for this use case won't be offered any time soon, sorry :( but we'll note this as a use case that some devs want and consider this for the future

chilly siloBOT
chilly siloBOT
#

Greetings, everyone. We just spent a bunch of time going through button possibilities and decided we are not going to add more button styles. In general, we think button styles should be tied to behavior, not the color itself. For example, green to indicate success, red to indicate danger, etc. We also want to ensure that the styles we add to our public API reflect the best practices that we use in the client (outline buttons, for example, can raise accessibility issues).

So despite bu...

#

Greetings, everyone. We just spent a bunch of time going through button possibilities and decided we are not going to add more button styles. In general, we think button styles should be tied to behavior, not the color itself. For example, green to indicate success, red to indicate danger, etc. We also want to ensure that the styles we add to our public API reflect the best practices that we use in the client (outline buttons, for example, can raise accessibility issues).

So despite bu...

chilly siloBOT
chilly siloBOT
#

If you want to automatically change the bot's profile every month, for example, you can do it with PATCH users/@me.

This worked brilliantly until the application commands came along. This is because with these, the bot icon is not shown, but the application icon.
^ I therefore suggest 2 solutions:
1. Change it to show the bot icon
2. Enable application for bots
3. Other ?:?

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description
I have a bot, that doesn't have a bot token (only http interactions). I set authorization method in its OAuth2 settings. But I don't see a Add to server button in my server

Steps to Reproduce

  • have a bot without token
  • set authorization method
  • make it respond (or not respond) to command so we can see its profile
  • see no button

Expected Behavior
there will be a button in profile that will add bot to server

Current Behavior
there is no ...

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

Buddy, they work on Whatsapp.
Here are they:
` <!-- WEBSITE TITLE & DESCRIPTION -->
<title>WYLD - You vs the Wild.</title>
<meta name="description" content="Gather Resources, Fight Wildlife and build a Home.">
<meta name="keywords" content="game, landing page, gaming, business, wild, wyld, steam">

<!-- OG meta tags that improve the look of your post on social media -->
<meta property="og:site_name" content="WYLD" /><!--website name-->
<meta property="og:si...
#

night listed a few cases that can make the embedding fail: https://github.com/discord/discord-api-docs/issues/4146#issuecomment-983105972

Notably, he linked https://ogp.me/ which says that 4 properties are required. None of your websites includes all required properties. I would first try to include all these properties.

Also, Discord can cache an old version of your OG tags. So when testing, be sure to include something like ?test=<random value> at the end of your URL to force Discor...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I've forgot to mention it when initially making this post, but this had spontaneously come back into relevance whilst talking on Discord.

While the body of this issue has a far narrower scope than the title would imply, this actually does apply to more than just interactions, though with the direction Discord wants to steer developers, interactions are the most important, hence the initial message that spawned this discussion.

I wanted to list some examples of what can really only be de...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When a capital letter is typed while entering a ROLE or MENTIONABLE option type, the role autocomplete disappears, unless an @ was typed at the beginning of the option value. To select a role, you must either prefix it with @ or type its name all lowercase.

This issue is present on Desktop and iOS (idk about Android)

Steps to Reproduce

  1. Have a slash command option with type ROLE or MENTIONABLE
  2. Select the command and type a capital letter while sel...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When clicking on avatars of older messages of webhooks, the wrong profile is shown.

Steps to Reproduce

  1. Setup a bot which uses webhooks to send messages for different users. E.g. the matrix bridge using t2bot.io
  2. Send messages from different users
  3. when clicking on the profile pictur...
chilly siloBOT
chilly siloBOT
#

Currently, there is no easy way to determine when a member's timeout gets removed, as we only get a GUILD_MEMBER_UPDATE event for when the timeout is added. This is likely because the communication_disabled_until property never gets reset when this happens. I'd like to suggest a change in this behavior so that we can receive this event as that would open other possibilities for bot developers with this new feature.

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

It would be nice to have slash commands splitted into categories in slash command list!
Like this:
I have 5 commands:

  • Kick
  • Ban
  • Scream
  • Info
  • Ping

Instead of seeing the slash commands within 5 command, it would be nicer to see this in the slash list:
MODERATION
/kick
...
/ban
...
FUN
/scream
...
GENERAL
/info
...
/ping
...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

@A5rocks current locales of discord are:

de | German
en-GB | English, UK
en-US | English, US
es-ES | Spanish
fr | French
hr | Croatioan
it | Italian
lt | Lithuanian
hu | Hungarian
nl | Dutch
no | Norwegian
pl | Polish
pt-BR | Portuguese, Brazilian
ro | Romanian, Romania
fi | Finnish
sv-SE | Swedish
vi | Vietnamese
tr | Turkish
cs | Czech
el | Greek
bg | Bulgarian
ru | Russian
uk | Ukrainian
hi | Hindi
th | Thai
zh-CN | Chinese, China
ja | Japanese
zh-TW | Chinese...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Intro

I think guild_id should be present at-least in the following endpoints:

GET /channels/{channel.id}/messages
GET /channels/{channel.id}/messages/{message.id}

would be grateful if it is also added in
PATCH method too

Reason

when using these endpoints , there are 2 main params, ( channelId and messageId)

and the object that is returned on success ( taking Guild Text Channel as example ) is like this:

{
  id: Snowflake,
  type: 0,
  content: 'hello...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

https://discord.com/developers/docs/resources/webhook#create-webhook describes restrictions for webhook names. It also links to https://discord.com/developers/docs/resources/user#usernames-and-nicknames for additional restrictions. When testing how exactly they apply I noticed that some of them don't actually hold true and some could use some clarification.

Steps to Reproduce

Create a webhook for a channel through the API. Execute the webhook to send a message, pr...

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

(This issue is a copy of the pre-existing GameSDK issue located here)

Description

Attempting to call IDiscordImageManager::fetch will always return an DiscordResult_InternalError via callback. We then can't run get_dimensions or get_data, as these return DiscordResult_NotFetched.

Steps to Reproduce

Minimal reproduction project:

#include "discord_game_sdk.h"

#include 
#include 

void fetch_callback...
chilly siloBOT
#

Hello, i need help.
I test this api https://discord.com/developers/docs/resources/application using API link:
https://discordapp.com/api/applications/905544503258120272 (905544503258120272 is my bot id)

however, the api gives me the following error message:
{"message": "Bots cannot use this endpoint", "code": 20001}

when I do an
Authorization: Bot

I try to find out how to use this API, however, no postman doc or even some github can help me.

Would you help m...

chilly siloBOT
chilly siloBOT
#

it fetches the first two with /users/:id with the bot user id, and it doesn't calculate the number of servers; the bot gets its own server count from its guild cache and posts it to the bot list with the list's API.

there is /applications/:id/rpc but it's unfortunately undocumented and not supported for bots, and it doesn't return owner or server count

feature request for a supported get application endpoint that does return that data:

#

it fetches the first two with /users/:id with the bot user id, and it doesn't calculate the number of servers; the bot gets its own server count from its guild cache and posts it to the bot list with the list's API.

there is /applications/:id/rpc but it's unfortunately undocumented and not supported for bots, and it doesn't return owner or server count

feature request for a supported get application endpoint that does return that data:

  • [[Feature Request] Endpoint to f...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description
Public threads which are created on a message have the same id as the message. This leads to the issue of the not being able to calculate an accurate creation time for the thread and instead having to rely on other methods to obtain this, which aren't always viable or as accurate such as fetching audit logs or the first message in the thread.

Steps to Reproduce

  • Create a new public thread on a message.
  • Observe the id of the thread and the id of the message.

**E...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Just stumbled upon this; for anyone still struggling with it:

Sorry to say, team, but I agree — I really don't see why you shouldn't let bot devs make this choice for themselves. I can't say it's good UX for server mods, either.

Right now, I'm using this as a workaround:

const { Discord, Permissions } = require('discord.js');

if (!interaction.member.permissions.has(Permissions.FLAGS.MANAGE_MESSAGES)) {
    await interaction.reply({content: 'Sorry, you don\'t have permissio...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

There is also another thing, I will update my post when possible

On Mon, Jan 3, 2022, 8:38 AM David @.***> wrote:

This already works on mobile. I would also like to see it on Desktop.


Reply to this email directly, view it on GitHub
https://github.com/discord/discord-api-docs/discussions/3581#discussioncomment-1899519,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHY5WGT2JH23I4DIITVVBCDUUGDEZANCNFSM5BQB3H5A
.
Triage notifications on the go wi...

chilly siloBOT
#

CHANNEL_UPDATE event contains permission overwrite for not existing entity.

Steps to Reproduce

None

Expected Behavior

The CHANNEL_UPDATE event contains only the configured permission overwrites instead of additional not visible overwrites

Current Behavior

The permission overwrites array in the JSON contains in my case one additional overwrite for something that doesn't seem to exist.

Screenshots/Videos

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

chilly siloBOT
chilly siloBOT
#

I thought about it a lot and came to the conclusion: "How nice would it be if you could change a bot discriminator, just like normal users can with nitro subscription?"
It would be really cool, if we could be able to change the discriminator of our bots. Maybe make this feature available only for verified bots or make an application form, where you can apply for changing the bot discriminator to a specific one.

chilly siloBOT
chilly siloBOT
#

This feature will allow context menu commands to have alternative behavior. For example, send a response with a normal message instead of an ephemeral message.
This feature can be implemented by adding a new field "alternative" in data object which can take values true or false.

Example Interaction

{
    "application_id": "775799577604522054",
    "channel_id": "772908445358620702",
    "data": {
        "id": "866818195033292851",
        "name": "context-menu-message-2",
...
chilly siloBOT
chilly siloBOT
#

I have a bot in a server that has a "bookmark" context menu command (for messages). This command sends a link to the message to the user's DMs, so they can add a note and refer to the message later via the link.
Fancy fancy works great. But if I try to use it in a channel where they don't have send messages permissions, the bot responds with a Missing Permissions Discord error, even if they have the use application commands set in that channel.

When I brought this up in the DDevs se...

chilly siloBOT
#

Talked internally. Supporting a multiline argument type is, apparently, damn-near impossible with our current editor. We will not be able to support this, and will instead leave this as a requirement for when we build UI-based interactions to support text areas (which, frankly, is a better user experience).

Following up on this, has there been any update on Discord's potential to support new line arguments for slash commands?

Seeing as Slash Commands will become mandatory one way or a...

chilly siloBOT
chilly siloBOT
#

Description
Creating an Interaction Response with a callback type of 7 (UPDATE_MESSAGE) results in the original message's attachments to become unremovable, contrary to the expected effect described by the docs here.

Steps to Reproduce
Respond to an slash command by creating a message with an image and a button. Respond to the component interaction by editing the parent message and passing an attachment...

chilly siloBOT
#

In some situations, I want all threads in a channel to be limited to at max 1 hour of inactivity, such as a support channel with tickets. Some users think they need to set the threads to archive after 3 days of inactivity, which results in an accumulation of useless threads that moderators have to manually archive (which locks them).

It would be nice if you could set a maximum archive duration in the channel settings, similar to how you can already configure the default archive duration.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

The autocomplete in ROLE option shows wrong description of role. It shows
Notify users with this role who have permission to view this channel

But ROLE option isn't meant to notify users, so it should be changed.
Steps to Reproduce

Expected Behavior
It should show a different description based on the use case

Current Behavior

Screenshots/Videos
![image](https://user-images.githubusercontent.com/74945038/148251868-65e50...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

It's been another two months and here I was hoping this to be fixed. Please @discord, I at least want to know if I'm doing something wrong. I'm being asked to verify my bot, but I don't want to do that as long as it still requires Admin-permissions to run correctly. I want to continue developing my bot (Argus) but I'm just very demotivated since nobody wants to invite a bot that requires admin-permissions to work.

chilly siloBOT
chilly siloBOT
#

Description

Working on creating a new Discord API client and I kept getting 403 errors when attempting to make a websocket connection to gateway.discord.gg. Compared with a known working client and I was able to discern a difference based on whether the "origin" header was capitalized or not (as per https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 this shouldn't matter). This is may be an issue with Cloudflare but I'm not sure how to report that upstream since it isn...

chilly siloBOT
#

Description

When receiving a message with only Message Components as an Interaction Response, the client will remain in the "Sending command..." state.

Steps to Reproduce

Create a command that responds with only Components and use it.

Expected Behavior

Since this is an invalid response, the client should time out after 3 seconds or upon receipt of the bad response with an "Interaction Failed" error.

Current Behavior

The message is stuck...

chilly siloBOT
#

There are lots of bots having cooldowns on commands that are likely annoying users when they invoked a command without knowing what the cooldown actually is. So I thought about an implementation (when slash permissions arrive) to have an implemented cooldown option for running a specific command. This could also be done with other interactions: When a bot received an Interaction like from a button / context-menu or whatever, it could be able to create a response with a new cooldown the user/r...

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

Description

I would like to create a custom autocomplete for roles, for commands where certain roles should be excluded. However, when the option type is 5, 6, 7, 8, or 9, I get an error message at registry time:

400 Bad Request (error code: 50035): Invalid Form Body
In 13.options.0.autocomplete: Required cannot be configured for this type of option

The 'Required' field was, indeed, defined, but is actually accepted just fine for these option types; setting autocom...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

To help prevent empty issues like #4320, this pull request migrates the issue templates to use GitHub's new yml syntax.

Rather than a large markdown editor, each section is now a smaller markdown editor, and questions can be set to require a response as needed.

Because these are a bit of a pain to test, I've cloned them to my dummy repo I use for testing GitHub Actions - if you'd like to see what the UX is like, feel free to [create a random issue](https://github.com/nhcarrigan/action...

chilly siloBOT
chilly siloBOT
#

The PUT endpoint does not seem to be idempotent in my simple test case with one command:

[ {
  "default_permission" : true,
  "name" : "test",
  "options" : [ ],
  "description" : "test",
  "type" : 1
} ]

This returns the id - version (timestamp) of 930067428807950386 - 930071205317324851 (2022-01-10T12:10:55.235Z)

I then send the same request only moments later:

[ {
  "default_permission" : true,
  "name" : "test",
  "options" : [ ],
  "descri...
chilly siloBOT
#

Hi? Can someone help me? I don't understand what's going on...

Request

Headers

Request URL: https://discord.com/api/webhooks/930061284488138802/CxRmOq3uoCbBWcM8dYXcMQeSijQkd3AYLW5JPLsuq-jx5GIqtGXpgB4uAy1zr4JizfGe
Request method: POST
Accept: */*
content-type: application/json
User-Agent: GitHub-Hookshot/0b09aa9
X-GitHub-Delivery: 1e856fa0-720f-11ec-8a30-083a09e57c56
X-GitHub-Event: ping
X-GitHub-Hook-ID: 337502330
X-GitHub-Hook-Installation-Target-ID: 95238437
X-GitHub...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When I remove all permissions for a bot account, including all roles assigned to the bot, the slash commands for the bot are still available in the channel. The bot is able to handle the slash command normally, including sending messages as a response. When the bot user and all roles do no have permission to view the channel, let alone send messages, it should not be possible to interact with the bot's slash commands in that channel.

Steps to Reproduce

Create a new chan...

chilly siloBOT
#

Even if this was remotely feasible to implement on a backend, and had more tangible use-cases, I'm not sure it's a great idea.

BEFORE_MESSAGE_SHOW

So probably the most obvious issue with this is the fact that it could and likely would induce some amount of latency for most users, given that the same message event has to be reserialized twice per every message. As well as having to double the payloads sent, you're now receiving double the payloads per message, which can absolutely de...

chilly siloBOT
#

Also for security reasons i never recommend a user to click any link there they expose their IP and other possible personal information, the easiest way would be to include in the Discord APP itself a way to grant those rights to a bot or user inside the app, so no external connection to another host is needed, that would be the real security option, the user is logged into the client and should be able to grant permissions from inside the client without an external link for increased securit...

chilly siloBOT
#

Having the guild and user locale sent with interactions is a big step forward for improving bots i18n, but guild_locale (and preferred_locale in the guild object) cannot be used directly by bots as is. According to the preferred_locale documentation:

the preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US"

There are two major problems for bots to rely on that field for internationalizing guild-wide messages: servers owners...

chilly siloBOT
#

Even if this was remotely feasible to implement on a backend, and had more tangible use-cases, I'm not sure it's a great idea.

BEFORE_MESSAGE_SHOW

So probably the most obvious issue with this is the fact that it could and likely would induce some amount of latency for most users, given that the same message event has to be reserialized twice per every message. As well as having to double the payloads sent, you're now receiving double the payloads per message, which can absolutely de...

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

Description

This PR adds a pull request template. This should probably solve the issue of contextless PRs and encourage people to actually describe their PR with more in-depth details (and not just erase or ignore it).

Checklist

  • [ ] This PR fixes inaccurate/outdated information from the documentation.
  • [ ] This PR adds clarification to complicated/unclear explanations.
  • [ ] This PR adds more helpful context to incomplete documentation.
  • [ ] This PR fixes spelling and ...
chilly siloBOT
chilly siloBOT
#

Please do not make these a checklist, checklists show up very poorly if you're not using them as checklists.

I think this section should be called status, the suggestions should be moved into a comment so that people can move out relevant ones and not display irrelevant ones

Furthermore, the changes reflecting the current default version of the API is probably not a good suggestion. The default version is still v6 (deprecated) which is not what the documentation currently reflects.

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

When having, for example, a NUMBER option that has autocomplete enabled, typing other data than numbers, such as strings, still gets sent to the bot.

Additionally, empty string for these option types are also sent (when the user has not typed anything)

Steps to Reproduce

Have a slash command with a NUMBER option with autocomplete enabled, start typing e for example, your bot will receive the e

Or also just select the NUMBER option, your bot will receive ...

#

This list looks up to date to me (you can see edit times in the github UI btw)

Last we heard the new permissions system is closing in on final testing.

One thing that seems to be missed by a lot of moderators is the fact that bots do not have slash commands, applications do. The concept of "access" to a channel does not exist on an application, that is relegated to the land of bots. It seems there needs to be a lot more education on this point because it is increasingly frustrating ...

chilly siloBOT
#

This is intentional. Autocomplete sends you the user input (which is a string), so you can return something for them to select. Once they run the command, you will get a fully validated input.

Wouldn't it be helpful to have this behaviour documented since this behaviour doesn't seem to quite align up with the current documented behaviour that `An autocomplete interaction can return partial data for option values. Your application will receive partial data for any existing user input, as ...

chilly siloBOT
chilly siloBOT
#

All channel inputs in slash commands are validated by the API itself, you don't need to worry about the user sending in an invalid channel.

They can't be filtered though. API will check the channel exists, but not if the user can manage it (if user has specific permission in a given channel), or even if the channel is disabled in bot settings itself (in my bot, you can set permission to use command per channel per role, and that can't be done in API nor I saw any plans ...

chilly siloBOT
#

could you explain this issue more? I am getting {"error": "invalid_request", "error_description": "Invalid \"redirect_uri\" in request."} with this code:

    def exchange_code(self, code):
        data = {
            'client_id': self.pub_conf['discord_client_id'],
            'client_secret': self.priv_conf['discord_client_secret'],
            'grant_type': 'authorization_code',
            'code': code,
            'redirect_uri': self.redirect_uri
        }
        headers = {
 ...
chilly siloBOT
#

could you explain this issue more? I am getting {"error": "invalid_request", "error_description": "Invalid \"redirect_uri\" in request."} with this code:

    def exchange_code(self, code):
        data = {
            'client_id': self.pub_conf['discord_client_id'],
            'client_secret': self.priv_conf['discord_client_secret'],
            'grant_type': 'authorization_code',
            'code': code,
            'redirect_uri': self.redirect_ur...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Even if this was remotely feasible to implement on a backend, and had more tangible use-cases, I'm not sure it's a great idea.

BEFORE_MESSAGE_SHOW

So probably the most obvious issue with this is the fact that it could and likely would induce some amount of latency for most users, given that the same message event has to be reserialized twice per every message. As well as having to double the payloads sent, you're now receiving double the payloads per message, which can absolutely de...

chilly siloBOT
#

Description

First observed slightly before Christmas, it seems that when banning a user with delete_message_days set to >0, messages sent by the target user within that time frame are not all reliably deleted.

This has been particularly annoying with the common Nitro scams, where from my experiences bans will now only remove (subjectively) 60-80% of scam messages, and the rest has to be manually searched for and deleted by hand.

This is inconsistent to reproduce. In my attempts t...

chilly siloBOT
#

Nextcord is a Python wrapper for the API, based on discord.py. As you all know, discord.py was archived, so features stopped being implemented there, so the things that distinct Nextcord from dpy are essentially the API changes since that point:

  • Added slash command support
  • Added user/message command support
  • Support for timeouts and scheduled events

Ratelimiting
As this is based on discord.py the ratelimiting is still implemented well and correctly to avoid 429s where possib...

chilly siloBOT
chilly siloBOT
#

Description

When updating a channel's position through the modify channel endpoint should create an audit log. When renaming the channel, an audit log is created. When changing the channel position, it is not.

I've noticed that there is a separate endpoint which has been created specifically for this purpose: [the modify guild channel position endpoint](https://discord.com/developers/docs/resources/guild#modify-gu...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I have not tested if this affects bots.

Can confirm that it does; for the same use case. Our bot detects scams and bans the offenders with the option to clear 1 day worth of messages. We have observed that this lately fails to do just that. Messages in question often aren't even old, on the brink of 1 day, or in very busy channels, but very recently sent and even in channels without any activity

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Ephemeral messages are not ordinary messages, they are not stored on the Discord server. Only in the cache of the client who received the message. By removing the flag of such a message, it will not become ordinary.

In your case, it would look good to respond to the slash command with an ephemeral message with text, and respond to button with an ordinary message with a picture. Also, by clicking on the button, you can delete an ephemeral message with text.

chilly siloBOT
#

Thank you for your detailed reply, this clears up some confusion for me ❤

you can see edit times in the github UI btw
Yeah and that tells me the last update was almost 3 months ago. That's why I was asking ^^

(and if you don't want any slash commands in a channel, you can turn off perms to use them in that channel as a stop-gap, I know that's slightly frustrating for mod commands)
I know that, but it doesn't work for me, if I'm an admin. And I'm an admin on quite a few servers (un...

chilly siloBOT
#

The difference between bots and applications from a bot dev's POV.

An application is the thing you create in the Developer Portal.

A bot is an application with a bot account that joins servers and can perform actions using the account.

This can include posting messages, managing users, etc.

What are "interactions"?

Interactions are a new way for users to interact with Applications. They do not require a bot account attached to the Application to work (though a bot acco...

chilly siloBOT
#

Let's assume the Discord bot gateway ceased working at 9:30 a.m.; perhaps Discord is having trouble connecting to the gateway. Bots would be unable to receive commands from the gateway, so I believe a fallback interaction endpoint would be a good method to prevent this. If your bot isn't connected to the gateway, you might make interactions a backup option through the Discord Developer Portal. This could increase my bot's uptime, and my users will be unaware that there is an outage because my...

chilly siloBOT
chilly siloBOT
#

While I understand y'all want more things audited, this issue is specifically about documentation saying the modify channel endpoint supports the X-Audit-Log-Reason, despite the position property not being audited. Again, I'm aware that the modify channel position endpoint exists, which claims to support the X-Audit-Log-Reason header, however I'm requesting for a change in docs or a change in behavior.

Please take your unrelated audit log complaints or feature requests to a different G...

chilly siloBOT
#

Thanks for the reply, this makes my picture of that whole change a little more complete.

However as I wrote above, I'm using a library (discord.py/pycord) for bot development. One of the reasons for that is not having to look at the Discord API docs (the other reason being that I inherited that bot). Frankly put, those docs are too low level for me rn, e.g. I don't work with flags at all, those get abstracted into individual properties. To me the whole docs is pretty confusing, mentioning ...

chilly siloBOT
chilly siloBOT
#

The command ID is already necessary for all the maintenance that needs to be done on commands such as permission updates, deletion, etc. Don't let your code guess what command was used based on the name, just setup a lookup table by the command IDs to execute the precisely correct command body for a given interaction.

When you upload your commands wait for Discord's response to get their command IDs. At this step your code knows whether or not they are global or guild commands because the ...

chilly siloBOT
#

OK, I was able to come up with my own solution. Before sending out the did you mean message, send a message response with a message like "Waiting on user". Then send the did you mean message as a follow up.
image
You'll want to store the interaction token from the slash command, as we'll be using it later.
After the user presses the button, we edit the did you mean message to something...

chilly siloBOT
#

Please take your unrelated audit log complaints or feature requests to a different GH issue or to the forums. This issue is specifically about the modify channel endpoint.

Trying to suppress others' opinion while claiming them so-called "unrelated" when they are clearly not, yet you mentioned some other cases as well? Doubleplusgood comrade.
As far as I know there were several issues already where feature requests (on support.discord.com), some other cases wh...

chilly siloBOT
chilly siloBOT
#

Trying to suppress others' opinion while claiming them so-called "unrelated" when they are clearly not

Suppressing would be telling others to shut up and that their opinions don't matter, which I clearly did not do. Instead I forwarded them to post their opinions in a more appropriate place, which certainly isn't this specific Github issue. This Github issue is about the audit log, the channel modify endpoint and the channel modify position endpoint, not about audit logging the removal o...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

It would make sense for applications to be able to mention their own commands, allowing a way to instruct a user to another command.

For example, my bot implements Fortnite oAuth, which requires users to do /login. If they try to do an oAuth command without logging in, they will get this error: https://imgur.com/a/Xggydm6

I propose a way to link to an application command. This would allow the user to click on the "hyperlink type object" to start invoking the command, and hover over i...

chilly siloBOT
#

Application command options are documented here: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure

One of the fields for options is choices, which limits the permitted values shown to the user for the given option. Currently, this field can only be configured for STRING, INTEGER, and NUMBER option types. I suggest that choices be implemented for the USER, CHANNEL, ROLE, and MENTIONABLE opt...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

TL;DR: Add a field on /bot/gateway that contains the global REST ratelimit

I was recently made aware that bots can have varying REST limits outside of big bot sharding.

Previously, the consensus was this: you either have 50/s or you are on big bot sharding. For big bot sharding, you have a 500/s floor and your REST limit is based on this formula: 25 * max_concurrency. In this manner, libs could calculate the REST limit accurately. Apparently this is not the case anymore (or hasn't bee...

#

An update to the situation as not everyone seems to be aware of this. Discord is currently building a slash commands permission UI (and API for that matter) which looks something like this:
image

This is not exactly what this issue was proposing but it does serve the same purpose. The screenshot above is still a beta or even alpha version of the UI so things might change but so far th...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

If you have support built for it, why aren't your interactions REST already? Discord built this system with the gateway pain points in mind. Furthermore, the cases where Discord goes down only for bots and not for users aswell are so rare that it just doesn't make sense to have a backup in place.

If you want commands to be more reliable, just use REST as the default. It's a dedicated service for bots and will probably prove itself as the more reliable option (to us, it already has).

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

Description

If you try to register an autocomplete boolean slash command option, the given error message is wrong:

{"code": 50035, "errors": {"0": {"options": {"3": {"options": {"0": {"autocomplete": {"_errors": [{"code": "APPLICATION_COMMAND_REQUIRED_INVALID", "message": "Required cannot be configured for this type of option"}]}}}}}}}, "message": "Invalid Form Body"}

Steps to Reproduce

try to register a boolean slash command option with autocomplete enabled

Exp...

chilly siloBOT
#

Description

After entering the Discord OAuth2 flow (https://discord.com/api/oauth2/authorize) and signing in with either email/password or QR code, it does not go to the callback and instead just sits there.

The login request (POST https://discord.com/api/v9/auth/login) succeeds and returns a token and [AuthenticationStore] setAuthToken called. {tokenManagerHasToken: true, storageHasToken: true} is logged. If you close the window and reopen it, it will immediately go to the callback...

chilly siloBOT
#

It would be cool to have a feature that a dialogue, similar to the one that pops up if you delete a server, pops up if a bot gets removed from a server. In this dialogue the member who removed the bot can select an option why they removed the bot.
This would be really helpful to improve bots

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Description

when ever i like talk to people it doesn't let me here them and its the same with music so i have to change my import to here them and i can't talk

Steps to Reproduce

please fix this problem i keep on using my alt accounts so i can here and talk at the same time and listening to music please help

Expected Behavior

not good

Current Behavior

anger and frustration

Screenshots/Videos

i dont have any videos or screenshots sorry :(

Client and...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

This discord-api.py library does not seem to handle rate-limits properly:

https://github.com/tuna2134/discord-api.py/blob/main/discord_api/http.py#L42

https://github.com/discord-api-py-org/discord-api-types/blob/main/discord_api_types/http.py#L30

You must handle the X-RateLimit-* headers as described in the documentation: https://discord.com/developers/docs/topics/rate-limits

This library also only seems to handle 3 gateway events, unlike all the other python libraries which sup...

chilly siloBOT
#

When you upload a file named hello (world).png, it will be renamed to hello_world.png. The attachment://filename.png used in embeds is not changed, which results in a resolution failure and the image is not added to the embed.
Maybe this same rename strategy could also be performed on the link to make this compatible?

This was originally brought up in #4292, which documented the behavior. However, this should probably be addressed and improved for a better user experience. @IanMitch...

chilly siloBOT
chilly siloBOT
#

Description

When removing an attachment in a message sent by another user, the API 403s with the response of {"message": "Cannot edit a message authored by another user", "code": 50005}

Steps to Reproduce

  1. Have manage message permissions within a server (Ownership included).
  2. Have another user send a message with an attachment, the message must have some form of content such as multiple attachments, or text.
  3. Press the x button on an attachment to remove it, then confirm....
chilly siloBOT
#

I'm avidly against the idea of adding a library with a support server whose PR author here (admittedly) partake in saying toxic things. It's not necessarily a bad thing to be joking about the culture of your own community, (as this is most of the time the case) but I think it's immature and extremely selfish to be saying things that appear to be in some form open-handed manipulation of the Discord staff for access to closed beta testing:

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

chilly siloBOT
#

open-handed manipulation of the Discord staff for access to closed beta testing

How is this manipulation? @Lulalaby is a core developer for the Pycord library and the permissions test server is for large bot and library developers, as well as a few DMD members. Since they are part of the core Pycord developer team, I see absolutely no issue with them requesting access to the server and Mason granting them said access.

if this were to be posted by the project maintainer

They are a...

chilly siloBOT
chilly siloBOT
#

While slash commands are still coming out, it's a huge step from a prefix based command handler, and I can say that it's pretty much hard to make a slash command handler with the popular libs, it's not their problem, but slash commands are made to be a lot different from message.content based implementation. While you all can definitely say slash are good, but it's still in its early stages and I think it's not much good than the nostalgia message prefix.

Since the whole point of slash com...

chilly siloBOT
chilly siloBOT
#

The Discord staff have been very transparent about the reason behind the message intent behind for privacy and security reasons. I agree with the developers' response that applying for the intent "to make message commands still work" is and should remain invalid. I strongly believe that we'll be seeing most developers like myself transition over to interactions including application commands for the long-term future. While message commands may have their own benefits, an intuitive UX design f...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

From my understanding, external asset URLs (seemingly only for large_image and small_image) have been possible for the past month or so, yet have gone undocumented. This PR attempts to solve this!

I have two thoughts regarding the contents of this PR:

  • Should I keep the edit to the deprecated Rich Presence SDK? I did so as the RPC FAQ is still prominent on the sidebar listing, but I am not sure if this ideal.
  • What external image URL should be used as an example? I used the GitHu...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

@A5rocks
using http post method with localizations returns me status code 200s

json_ = { 
        "type" : 3, 
        "name": "테스트용_커맨드2",
        "name_localizations" : {
            "ko" : "테스트용_커맨드2",
            "en-US": "command_for_test2"
        }
}
endpoint ="https://discord.com/api/v8/applications/{testapp_id}/guilds/{guildID}/commands"
requests.post(endpoint, headers, json=json_)

I sent json like above, so I thought localizations were working

chilly siloBOT
chilly siloBOT
#

You may send a payload before you actually send the first identify, and you wont have the session_id

So "if you have a session_id" is still correct, am I missing something?

Just to clarify, I've set it as "if you have a session_id" just because you can get those errors before you get your session_id, attempting to send a valid resume payload on close code 4001 gives an opcode 9 though.

chilly siloBOT
chilly siloBOT
#

Also having this issue on 109.0 (29659) stable on iOS 13.4.1 iPhone 11 Pro

This is a huge issue due to possible rate limit violations, as it appears the server is receiving duplicate requests multiple times a second from a client device with this issue.

This is also not very good for server performance. Is there any guidance to try to mitigate this issue until the mobile teams get to it? Right now I'm only responding to unique Autocomplete Interactions but the spam doesn't appear to sto...

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

To prevent permission escalation, a user must have a permission at the parent channel or guild level to be able to add that permission to an overwrite in a channel when they only have Manage Roles permission at the guild/category level. We do this to prevent permission escalation within channels. To avoid this, your bot must have Manage Roles permission bit in the channel, which will allow it to set any permissions within said channel.

chilly siloBOT
#

Summary

This PR adds the package Discord.Net.Rest to the Interactions section in the community resources

The rest package provides methods to both verify and deserialize webhook interactions.
Below is an example on using the webhook based interactions.

string publicKey = "YOUR_APPS_PUBLIC_KEY";
var signature = request.Headers["X-Signature-Ed25519"];
var timestamp = request.Headers["X-Signature-Timestamp"];
var body = await new StreamReader(request.InputStream).ReadToEndAsyn...
chilly siloBOT
#

This is client behavior not API. Some people still using it to get id so we keep it there, however that shouldn't go into API doc.

There has been a lot of confusion from new developers (or at least new to the discord API) on how to render emojis when sending message through bots, some were thinking right clicking an emoji would copy its id when it actually copies the message id. While documenting the client behavior may seem off topic on the API docs, it is important to realize that the ...

chilly siloBOT
chilly siloBOT
#

This is client behavior not API. Some people still using it to get id so we keep it there, however that shouldn't go into API doc.

This commit is not about client behavior, it is about bot behavior. Since you did not qualify your response with context I assume you meant this comment in response to the entire commit.

Furthermore, a short sentence that offers an explanation for getting emoji IDs is not off topic. Emojis are a client feature anyway, and Suspense4615 hit the nail on th...

#

imo the details for bots and webhooks sending emojis should be documented on the relevant endpoints, instead of in message formatting

I disagree. This is a message formatting issue and has little to do with the endpoints. Logically, it makes the most sense here.
It's not as if the endpoint rejects the message when the bot tries to send an emoji from another server. It just won't render it.

Logically, someone looking to send a message that has an emoji in it with a bot will look at...

chilly siloBOT
chilly siloBOT