#github-notifications

1 messages ยท Page 19 of 1

chilly siloBOT
#

Hello ๐Ÿ‘‹

I am hoping to request additional details be provided on this event if possible. For any bot that has server log feature, intents have severely impacted our ability to have proper logs.

Due to the changes in intents, it has become nearly impossible to fetch all members on startup because it takes way too long for larger bots. That means we will not have members cached when a role is changed meaning we will always be forced to fetch audit logs on every single guildMemberUpdate o...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Disabling certain features from unverified bots have some downsides, many servers have their own bot which they use for support purposes and more things - and other things that involve DMs.

In context of a public bot, 100 servers is a super tiny amount of servers and at that point re-branding should still be an option. But for bots that are in more than 1k or 2.5k servers, owners should be able to contact support for changing the bot's name for re-branding or whatever - permanently taking ...

chilly siloBOT
chilly siloBOT
#

Disabling certain features from unverified bots have some downsides, many servers have their own bot (1-2 server bot) which they use for support purposes and more things - and other things that involve DMs.

That feature could be opt-in, as in it comes disabled by default. Maybe show a warning above the message when an unverified bot DMs you?

In context of a public bot, 100 servers is a super tiny amount of servers and at that point re-branding should still be an option. But for bots...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I'd rather add an option to request a name change in dev portal.
I think @alula's approach is by far the best option one suggested here regarding name changes, considering that disabling name changes all together could limit developers to an old "brand", even though they already moved on from certain name.
I think name changes should be allowed, but perhaps a little note saying that this user used to be x?
I don't think @Greenfoot5's approach is very good, because then you would only ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

On the verification page, it says "Server Members Intent"
firefox_J53nlNLyXB
I've had people asking me what that is, because they're used to the Guild terminology. Why is it different on the verification page? Considering this is a page for API developers, it should be guild
because that's how it is in the docs when talking about the new intent system, example: https://discordapp.c...

chilly siloBOT
#

Suddenly my bot token got invalid for some reason but it is valid

    at WebSocketManager.connect (/rbd/pnpm-volume/f6cd38b3-371c-445a-96bb-d7b449acbc8b/node_modules/.registry.npmjs.org/discord.js/12.1.1/node_modules/discord.js/src/client/websocket/WebSocketManager.js:135:26)
    at Client.login (/rbd/pnpm-volume/f6cd38b3-371c-445a-96bb-d7b449acbc8b/node_modules/.registry.npmjs.org/discord.js/12.1.1/node_modules/discord.js...
chilly siloBOT
chilly siloBOT
#

I tried

  1. No email regarding that. Also i myself tried to find it but it's nowhere
    available even in my spam folder.
  2. Tried that like 100 of times now.
  3. Another bot is working perfectly fine with the same code.

On Sat, 11 Apr, 2020, 8:56 PM SinisterRectus, notifications@github.com
wrote:

It is possible that the token was invalidated, or that you are banned.

  • Check for an email from Discord stating whether your token has been
    invalidated or that your bot has been disabl...
chilly siloBOT
#

Hi all,

As the title says, I'm trying to access via API to the count of connected users to a voice channel. I've already used the discord API, and I have a bot on my guild.
I'm using raw HTTP petitions, using CURL for testing, i'll integrate it into an IoT project, so I can't use frameworks.
I can get channel details, guild members, but not users in a voice channel. I've read the entire api doc.

Any help please? Much appreciated

chilly siloBOT
#

Application below will crash if discord is not running or is not installed. core will be null. The docs should mention that.

if (core) should be added before updating activity.

https://discordapp.com/developers/docs/game-sdk/sdk-starter-guide

#include "MyPawn.h"
#include "discord-files/discord.h"

discord::Core* core{};

AMyPawn::AMyPawn()
{
     // Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
    Prim...
chilly siloBOT
#

Since the last Discord update there is a REALLY annoying bug with the interface (if used via browser):
everytime you open a folder and click on a server, you get pushed on top of the server list and you don't join the server.

Once the folder is open you can scroll down again and join the server. You try with another folder? Same behavior, get bounced back on top and you have to scroll down again for join the server, it's a pain.

I've tried with Chrome and Firefox and both have the same...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I do think this would be an amazing addition to the API, however I do see both sides. It would be irresponsible of Discord to allow application to use this value for harmful or bad intentions, as mentioned in the extreme cases above. Additionally, I do believe this could be a very good feature that bots could use to enhance features. In my opinion, The cons out-way the pros, however it wouldn't be a bad consideration. Also, in the extreme negative case, Wouldn't you agree that an application ...

chilly siloBOT
chilly siloBOT
#

@advaith1 I don't think "People will think it's a bug in the bot" or "I'd like to make it visible in a profile command" are big enough reasons to justify making it visible to every bot.

The way I'm understanding it, it's only visible behind an OAuth scope because most regular applications should never need it. Maybe some applications could do something a little extra with it (like with the profile command example, being able to mark the user as having Nitro in a profile command), but tha...

chilly siloBOT
chilly siloBOT
#

@Artuto - If this feature was added, it'd take a while for all hundred or whatever Discord Libraries to even make a breaking change to allow this. Unless you're making requests to the API yourself.

I donโ€™t this this is an appropriate reason for either argument. Any change or new feature discord adds has to also be added to every library. This is like saying that Discord shouldnโ€™t release their new UX features because it will take libraries a good while to implement those. Also, popular lib...

chilly siloBOT
#

When you send a request to the web API with the user-agent beginning with "Java/1." it returns Forbidden 403

Steps to Reproduce:

  • Send a request to the discord API with the user-agent header beginning with "Java/1." (without the ""'s) and it should return Forbidden 403, I've tested it in Java and JavaScript and it always works when the user-agent header doesn't begin with "Java/1." (Note: it doesn't execute the "normal" code, as in it just returns 403 and nothing else)

Expected Resul...

chilly siloBOT
#

I don't know if this is intended, but the documentation states:

Clients using the HTTP API must provide a valid User Agent which specifies information about the client library and version in the following format:

User-Agent: DiscordBot ($url, $versionNumber)

Clients may append more information and metadata to the end of this string as they wish.

Note the "must" in the first sentence. So, a user-...

chilly siloBOT
chilly siloBOT
#

yo, so when I screenshare just one window (such as chrome) my friends cannot hear the video Im trying to show them. But when we do the opposite and im trying to listen to my friend's screenshare, it works without any problems.

I guess this is a bug. Just wondering how I can fix it because this is seriously so frustrating.

chilly siloBOT
#

FYSA:

Once a bot is verified, its ownership cannot be transferred--either from user to user or from a user to a team. Additionally, a bot's name cannot be changed in the Developer Portal or the API after verification.

Our support team is currently building out the infrastructure to help you transfer the ownership of verified bots and change the name of verified bots where necessary. If this is something you end up needing, please contact us at https://dis.gd/contact and we'll be ...

chilly siloBOT
#

I don't think a proper ADT representation is possible because internally no such data structures exist. We always re-use the same primitive objects in additional types whenever possible. In reality all fields of a model could in theory be returned on a different type, and we have re-used fields in this manner for past feature releases. Someone could document the "fields that matter" for each type, though.

#
z64

I agree that a big pain point with the docs is the consistency in describing the representation for objects in different contexts. The ways we communicate this include:

  • Notes on the structure table: The Guild Object is painted with asterisks that denote which fields are only sent with GUILD_CREATE, similarly with the Message Object table for MESSAGE_CREATE fields.
  • Blanket notes on the event: MESSAGE_UPDATE has a note saying "a message object, but every field is optional except...
#

We most likely would not add a count to these events, as they are related solely to the member object (not the guild). We do return member count in guild responses in some places (like guild ready or invites), so perhaps a feature request you could make would be related to a new event which gives you updates of that value or a way to request that value in the response via API.

chilly siloBOT
chilly siloBOT
#

A channel might want to present a message with date/time information. Both the date and time may be important to the recipient. The presentation of the date and time should be controlled by the sender, but the date and time should be localized to the recipient.

Discord currently provides a simple mechanism for this. Embeds may carry a timestamp that is included in the footer of the embed. While the timestamp is localized when shown to the receiver, the format of the date/time cannot be cus...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

As suggested by @night , opening up a new issue for this.

I would like a new event/intent that we can subscribe to that just gives us a guild id and a member count. Either a new event or adding it to GUILD_UPDATE?

Needing to have a privileged event just to keep track of the number of users in a server is unfortunate. It also makes difficult/impossible to have a stateless bot for DiscordServers

chilly siloBOT
#

Acouple days ago I was experimenting with statuspage's webhook function, sending a status update to Discord via glitch. As part of this, I was checking if messages (including webhooks) could be published by bots so we don't have to do it ourselves
Now the thing is, I don't see any documentation about the /crosspost endpoint despite it working, I only found #1161 and unless I'm misunderstanding it, it seems like bots using the endpoint aren't supported? If that's the case then surely it mak...

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

Currently, in an Embed Author Payload, the name parameter is optional, but it doesnt really makes sense for it to be. (https://discordapp.com/developers/docs/resources/channel#embed-object-embed-author-structure)

If you send a embed with an embed author that only specifies a icon_url, it will send the embed without any icon:

{
    "author": {
        "icon_url": "https://cdn.discordapp.com/avatars/377812572784820226/0e0eb1041867c2f760cfd1f8d71ae969.webp?size=1024"
    }
}...
chilly siloBOT
chilly siloBOT
#

One would expect that the mfa_enabled field is supplied if you have the IDENTIFY scope and the information is pertaining to the current bot user (e.g. in the READY event and the USER_UPDATE event). However, since no differentiation is made between the format of a regular User object for an arbitrary user on the API and the bot user object, this becomes overly unhelpful.

For example, USER_UPDATE events seem to miss out the mfa_enabled field; but the documentation implies that it is provided...

#

@SinisterRectus agreed. They should have been documented by whoever implemented them and had access to the source code in the first place.

@TheOnlyArtz ```json
{'avatar': '23556fd7bed640bd428e4731edcd741b',
'bot': True,
'discriminator': '0220',
'email': None,
'flags': 0,
'id': '658822586720976907',
'locale': 'en-US',
'mfa_enabled': True,
'public_flags': 0,
'username': 'Reinhard',
'verified': True}

i would argue that this is false.
#

seems this is buggy behaviour

then opening an issue about it

that was the point of this issue :P

changing the avatar on the dashboard leads to this:

{"t":"USER_UPDATE","s":2887,"op":0,"d":{"username":"hikari","public_flags":0,"id":"572144340277919754","discriminator":"5863","bot":true,"avatar":"a0910b09c43b839ebe60c9b58a302803"}}

updating the application name on the dashboard leads to this:

{"t":"USER_UPDATE","s":22,"op":0,"d":{"username":"hikari","public_fl...
#

Well from my testing (where all changes I made using the bot dashboard) it seems to be that when I update the bot's username I get a full user object in the user update event and when I update the bot's avatar I get a partial user object.

With the partial user object I receive after updating the bot's avatar being in the following payload

{"t":"USER_UPDATE","s":19,"op":0,"d":{"username":"Reinhard2","public_flags":0,"id":"658822586720976907","discriminator":"0220","bot":true,"ava...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

It's generally assumed, that "Manage Channels" permission gives users and bots control over channels. That control is denied if a user doesn't have "Connect" permission.
Addition of this constraint is extremely counter intuitive and there's no reference to it anywhere. While it is somewhat clear that you can't edit that channel while in any client (the lock icon appears next to it), there's almost no way of knowing that when you're running a bot, as it just 403s with no further explanation.
...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

I just thought of something. My bot has to be sharded, so I usually use a second test bot token for my testing and new development. However now some of my features require privileged intents and I am unable to use those features on my test bot. I have to declare non-privileged intents when trying to use that bot. What would be the solution to this?

Should I get my test bot verified too? Could there be a way for a "test mode" for a token in the future?

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

In addition to this would I appreciate if we would get a way to know, how many bots and actual humans/clients are on a server.
Some of us use this information to f.e. not have the bot on "Bot" Discords (Servers with WAY more bots than users) which are often a waste of resources and bandwidth, even with the new Intents used.

Right now is the only way to get those numbers, to get the actual users and check if they're a bot or not, which adds extra steps and in cases like a Join event also r...

#

(sorry for all the people I notify with this)

Sorry to ask this now, but what exactly are public flags now and what are they used for?
Also, if they're really "can be seen by bots" as ThaTiemsz said in his original comment, why is it with scope identify documented?
For me are all things with OAuth2 code identify not viewable by bots, unless you clearly request this scope (which you normally wouldn't), so a bit of clarification would be appreciated here.

chilly siloBOT
#

Notify affected users with a system DM and email. Once a spam bot has been detected, all users that have been direct messaged by the fake bot should receive a system DM telling them to secure their account by changing their password and enabling MFA on their account if they did accidentally type in their password or add the bot to their server.

I personally see some inconvenience (mainly on the side of Discord and their API) with this.
When a bot, that f.e. would be on 50+ Servers D...

chilly siloBOT
chilly siloBOT
#
z64

This addition serves to address another frequently asked question we receive in the Discord API server.
When one researches how to scale their bot, it is often not apparent to readers that you can connect:

  • multiple sessions with the same [shard_id, num_shards]
  • multiple sessions with different num_shards values

These details are often key when designing deployment systems that can scale without downtime, or more fine-tuned load balancing.
While the current documentation doesn'...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#
z64

This is rewrite of the section on heartbeating that clarifies some very frequent questions surrounding heartbeating asked in the Discord API server, such as:

  • Q: When do I send my first heartbeat? Immediately, or after the first heartbeat_interval period?
    A: You can start at any time before the first heartbeat_interval period elapses.

  • Q: If I receive opcode 1, do I respond with a heartbeat ack?
    A: No. While already documented as such, this PR should hopefully make this less...

chilly siloBOT
#

Perhaps slightly unrelated, and maybe better fitting for another issue, but: Is there any recommendation for a minimum amount of time we should wait for a session to be issued? Or is it just, we should always wait an indefinite amount of time? I would presume an indefinite amount of time, but perhaps some clients may want to implement a timeout for this, for one reason or another.

chilly siloBOT
#
z64

I believe the current advice is fine; as long as the gateway continues to heartbeat & ack, you can expect the service to be responsive. If you are otherwise required to reconnect, Discord will send you the appropriate close frame, Opcode 7 Reconnect, etc.

Clients are of course still free to implement a timeout in a hypothetical situation they send an IDENTIFY and experience a very long delay before READY, but this is probably unwise; if the gateway is still issuing heartbeat acks, try...

chilly siloBOT
#

We're deploying a new parameter on GET /guilds/, with_counts. This acts similarly to the way that we resolve invites in our client and returns approximate member and presence counts for the guild.

We've heard a lot of folks with the use case of wanting to keep counts for usage of the bot, or members on a server, and the only way to do so was caching guild members. Now, that is no longer necessary :)

#

@msciotti Accuracy is very important to me for analytical and statistical purposes. I want to be able to see how the member count changes over time, even if just a little, which requires that the numbers I get are precise.

To be fair, now that I've thought about it, this would probably not do anything for me to help my use case anyway, as I would like to gather statistics on information that I just wouldn't be able to get, such as member vs bot count, number of online vs offline members, etc.

chilly siloBOT
#

@srhinos Yep, that's exactly what I intend to do. Hopefully, others can do the same. For me, I'm not targeting guilds with tens of thousands of members, so these numbers may be good enough for me. Though, they still don't tell me how many bots are in the guild, for example, so I may need to use the guild member intent anyway.

I'll experiment with both and see which method reports the most accurate number and use that for analytical purposes. I like the thought of not having to cache member...

#

If you could separate users and bot accounts somehow, that would be great. Large bots face issues with bot bank servers; some users collect tens-hundreds of bots into one single server with less than 3-5 users in it. Some bots have a feature implemented, to leave these pointless guilds, to avoid unnecessary resource usage. ( Not to talk about reconnecting to 80k servers, and having these bot collector servers at the same time. )

#
z64

Sure, that sounds fine to me. The reason I proposed this, is @jhgg (iirc) once gave an explanation that the desktop client waits a random amount of time less than the interval before starting to heartbeat, which helps prevent bursts of traffic at heartbeat_interval periods when reconnecting waves of sessions at once on Discord's end.

I recognize that bots are only a small subset of this traffic, and the same thinking likely doesn't matter as much - so I'm happy to reword this if we want ...

#

If you could separate users and bot accounts somehow, that would be great. Large bots face issues with bot bank servers; some users collect tens-hundreds of bots into one single server with less than 3-5 users in it. Some bots have a feature implemented, to leave these pointless guilds, to avoid unnecessary resource usage. ( Not to talk about reconnecting to 80k servers, and having these bot collector servers at the same time. )

This is not the first time we've heard this, but we are lik...

#

Perhaps we can look into adding limits on the number of bots which can join a guild.

This sounds like a decent idea. If I might suggest my take on it: Limit a guild to some number of bots (perhaps 50?), but then allow servers to be whitelisted to bypass this limit. This limit could be bypassed if the person adding the bot is the bot's owner (there's already a check to see if the user is the bot owner, when the bot is set to private, so it could possibly be reused).

Then, when a server...

chilly siloBOT
chilly siloBOT
#

This was once mentioned to add an additional column to the User structure, to indicate which of the fields are actually readable by bots and which aren't

Now I want to suggest to perhaps do that for multiple places, as it isn't always entirely clear, what things are usable/readable by bots and what isn't.
It would help a lot reducing possible confusion and all those "Why can't my bot use x?" questions. It woul...

chilly siloBOT
#

I also have one concern: currently, member counts are updated passively when we receive websocket messages for member update, but with this API, you need to either

  1. make API request for each guild the bot wants its count for
  2. cache the value, which is not always accurate (because, without the member update message, how do you know when the cache is invalid?)

For example, this is a discord.py code:

member_count = 0
for guild in bot.guilds:
    member_count += guild.member_co...
chilly siloBOT
chilly siloBOT
#

@night Could you maybe give a short example how this covers

with the use case of wanting to keep counts for usage of the bot

Maybe I'm not imaginative enough because I have to agree with the previous posters that for 100 guilds that would mean 100 API requests, for 10k guilds 10k API requests, etc. That sounds like an awful deal for all parties involved.

I'll add a real life example, both for you to see (yet another) one, and maybe other folks wanting achieve this kind of tracking....

chilly siloBOT
#

As previously noted above, the proposed change doesn't realistically/adequately solve the issue stated in the OP. This does, however, get us halfway to solving the bot collection guild issue without the need for privileged data.

  1. Discord shouldn't be trying to determine legitimate use of guilds with a large number of bots in guilds unless it's moderative in the hopes to protect Discord's service/platform. As stated above, there are both legitimate and illegitimate reasons to have a bot c...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Some time ago was the PR for public_flags merged, yet the documentation itself doesn't contain this information.
Additionally does it not explain in any way the specifics of said public_flags like f.e. which flags are available through it, if they require any specific setup or handling and some other info I currently can't think of.

So I ask here now for some clarification to these questions:

  • Are public_flags usable by bots wit...
chilly siloBOT
#

Are public_flags usable by bots without any additional OAuth scopes (Advaith answered it already but an "official" response from a Discord staff would be appreciated)

ik you want an official response but you can just test it lol, bots are using it in production without oauth

What flags are actually within the public_flags? Every flag from the flags field of the User object? If yes, why even have a separate field then and not just allow access to the fields option?

  • it's every **...
#
z64

Yes. It is hard to tell from the PR alone - because the documentation is not live yet - but [flags](#DOCS_RESOURCES_USER/user-object-user-flags) is an anchor link to the user flags table.
This is indeed meant to convey that all possible user flags values may also show up in public_flags. The only "difference" is public_flags is populated for Bot clients, and flags is not.

#
z64

It isn't useful to bring undocumented flags into the discussion - it just adds to the confusion.
Bit flags in the API follow the same policy as any other undocumented data in the API. The flags fields may contain any integer value. You are only ever guaranteed to be able to reliably enumerate the documented ones in the singular User Flags table. Any other bit may be set at any time, in any context, just as any object may carry any number of undocumented fields.

#

flags was a confusing user model value because it is internally a combination of public, private, and internal flags. we expose public and/or private flags on flags depending on the request context, which was hard to reconcile when we wanted to bring flags into the base user model serialization we serve network-wide.

as a result, public flags were pulled out into public_flags for just the public flags. flags still contains public flags to be backwards compatible (for now). for th...

chilly siloBOT
#

I'd like to see Discord applications have fields in their options to specify links for the privacy policy and terms of service for the application. The purpose of this would be to allow users to have proper notice if using a developer's bot is subject to any conditions and give notice to users of the developer's privacy practices, including what end user data the bot developer collects and how they use that end user data.

Of course, it wouldn't be good enough to just have the fields in the...

#

Would this be something developers have to do? Or would it be optional to non-verified but required for verification.
Also, I think for some developers (myself including) could be very difficult to make something like this as we have no experience. While tools may be made, they will likely also take time to make and in the meantime it could confuse many developers that don't have a need (currently) to focus on the legal side of things.

#

Maybe add fields for the Privacy Policy and ToS text and serve it through Discord?
Maybe.

I'm not a lawyer, but the idea sounds like it requires Discord to legally endorse a bot or the bot's policies, which seems contrary to the ToS:

You shall include in your Applications, website and other relevant locations a disclaimer stating that your Applications, website or any services is or are not endorsed or created by Discord.

chilly siloBOT
#

It would be pretty useful simply to have a free-text "about this bot" field in the bot settings page, and an UI that allows end users to access that text in a common way -- e.g. from the bot's profile popup.

Dedicating it specifically to ToS and privacy policy is probably best avoided -- it seems to imply a small can of worms, as Sinister points out. However, just having a standard place to look for usage instructions for a bot would be a UX improvement. If we imagine a size limit of 200...

chilly siloBOT
#

could just use the existing application description field and show it in more places (currently it only shows in the Authorized Apps settings page)

That would indeed go a long way.

However, I think that for an app that both ask some users to authenticate with Oauth2 and has a bot present in a guild, a user wondering "what is this app I authorized for my account?" will generally need a different kind of answer than the user who wonders "what is this bot I see in the user list in th...

#

The incoming change in #1528 adds HTTP guild properties approximate_member_count and approximate_presence_count for users who do not or cannot track these numbers with gateway events. For the sake of consistency, I recommend that presence_count be added to guilds received via the GUILD_CREATE event. This would allow users to have an initial presence count without having to make an HTTP request for every guild on initialization and without having to request presences (assuming they hav...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

this api is working as intended. embeds are built with an "all fields optional" approach, with exception to fields, where a name and value are required. this is to remain compatible with our service embeds, like slack embeds, which may have embeds missing fields. the client best-effort renders embeds based on the fields provided within it, but we don't render this case because the embed would seem broken if we did

chilly siloBOT
#

I don't like the idea of being contractually obligated to visit an external site for an application that could otherwise be served entirely through https://discordapp.com.

I'm not sure I understand what you mean. I'm not proposing any new contractual obligations. I'm only proposing that Discord give developers a way to notify users of the developer's privacy practices and conditions. I brought up consideration for a requirement for verified bots, but that's less important to me than the ...

#

It would be pretty useful simply to have a free-text "about this bot" field in the bot settings page, and an UI that allows end users to access that text in a common way -- e.g. from the bot's profile popup.

Dedicating it specifically to ToS and privacy policy is probably best avoided -- it seems to imply a small can of worms, as Sinister points out. However, just having a standard place to look for usage instructions for a bot would be a UX improvement. If we imagine a size limit ...

#

Would this be something developers have to do? Or would it be optional to non-verified but required for verification.
Also, I think for some developers (myself including) could be very difficult to make something like this as we have no experience. While tools may be made, they will likely also take time to make and in the meantime it could confuse many developers that don't have a need (currently) to focus on the legal side of things.

My thought is it would simply be an option, howev...

chilly siloBOT
chilly siloBOT
#

My opinion is that the inclusion of third-party terms of service or privacy policies, or references to them, as an official part of a bot's authorization flow effectively requires users to agree to them when adding the bot to a server, or maybe when directly interacting with the bot or when sharing a server with the bot. I do not think it is a good idea to require Discord users to agree, sometimes implicitly, to arbitrary third-party terms or policies that can be abusive, changed at-will, and...

chilly siloBOT
#

@SinisterRectus Fair enough, man. I don't particularly agree, but I do understand your point. I am of the opinion that any public bot should already have these things and this would be a way to give users more proper notice that inviting the bot to a server is subject to them.

I would prefer something like than a makeshift solution, which I'm having to do now. There are plenty of other services where this kind of feature is standard. In fact, many of them require that you have at least a p...

chilly siloBOT
#

Endpoint is live! So, merging PR.

I appreciate the comments here; as with most things, we do not intend for one change to solve every imaginable use case. The use case here was people asking "Hey, it'd be great to be able to get a count for guild numbers without using the gateway". And this solves that use case.

A couple suggestions I've seen here:

Add with_counts to /users/@me/guilds - less API requests!

It is less requests, but also a ton of data to query, and scales badly f...

chilly siloBOT
chilly siloBOT
#
  • Fixed missing ? for optional Guild#approximate_member_count
  • Documented a new field that Mason put in an example somewhere:
    Guild#max_video_channel_users. I assume this is optional, but I
    am not sure of the exact situations; I assume it will not be null
    though.
  • changed Guild#permissions to say "excludes overwrites" instead of
    mentioning channels specifically. Partially did this because I just spent
    10 minutes reformatting the table and didn't want t...
chilly siloBOT
#

I do not think it is a good idea to require Discord users to agree, sometimes implicitly, to arbitrary third-party terms or policies that can be abusive, changed at-will, and/or written by someone with no legal education or background.

Please take what I'm about to say, with the knowledge that I am not a lawyer, and that I may not be fully correct.

This is not how contract law works.

A developer cannot simply make a change to the contract, and suddenly make that change apply retroa...

chilly siloBOT
chilly siloBOT
#

@SinisterRectus I can't say whether some terms/policies are enforceable or not, because saying something "poorly administered" (legally speaking) requires considering a lot more than just a hunch. It needs to consider the specifics of the terms/policies, as well as the circumstances surrounding it, and possibly more.

All I can say is that abusive contracts are probably unlikely to hold up in court, and that contracts can't just... be changed, as both signers of the contract need to know ...

chilly siloBOT
#

Not sure how to answer that question since I'm not sure of the relevance. I don't think that there is a meaningful difference.

Maybe if someone can give a scenario where a Discord user would need to be "subject to additional terms and policies" by adding or using Discord bot, or why the standard Discord terms do not cover "what end user data the bot developer collects and how they use that end user data", then I can better understand this. Keep in mind you don't have to convince me, I'm ju...

#

I am curious if this feature request is attempting to solve a problem, or is a matter of convenience for the end user (when a developer chooses to opt into the system by providing said links).

If the former, then the point Sinister brings up 'why the standard Discord terms do not cover "what end user data the bot developer collects and how they use that end user data"' would need to be addressed.

If the latter, then it sounds like a matter of personal opinion that bots should be encoura...

chilly siloBOT
#

I don't disagree with you, I'm just saying that, when using a Discord bot and if given the opportunity, I'd rather not agree to potentially bogus terms than have to agree with them and later prove that they are bogus.

This is avoided by reading the terms and understanding what you're agreeing to. If you don't like them or think they're bogus, don't agree and find another bot. Frankly, there's plenty out there and they'll all likely have different terms.

I am curious if this feat...

#

I do not think it is a good idea to require Discord users to agree, sometimes implicitly, to arbitrary third-party terms or policies that can be abusive, changed at-will, and/or written by someone with no legal education or background.

@SinisterRectus Please take what I'm about to say, with the knowledge that I am not a lawyer, and that I may not be fully correct. (However, I think I know enough to at least have confidence in what I'm saying)

This is not how the law works.
...

chilly siloBOT
#

This feature request is trying to solve the problem of users being able to add bots and not being presented with the developer's privacy policy before it starts processing end user data. The user is given no notice about who the developer of the bot is, what information that developer collects with their bot, and how that information is going to be used. You might potentially be able to find a website for the bot with this information or it might be contained within the bot, but both of tho...

chilly siloBOT
#

@mr-calrissian In my view, the solution you've stated isn't a solution at all. It isn't the user's responsibility to try and find this information. As a developer of an application that uses end user data, it is my responsibility to ensure that the end user receives notice. It's less of a convenience to end users than it is an easier way to comply with privacy laws for developers.

If you think what you're doing as a developer is good enough, then by all means keep doing what you're doing. ...

chilly siloBOT
#

Not sure how to answer that question since I'm not sure of the relevance. I don't think that there is a meaningful difference.

Maybe if someone can give a scenario where a Discord user would need to be "subject to additional terms and policies" by adding or using a Discord bot, or why the standard Discord terms do not cover "what end user data the bot developer collects and how they use that end user data", then I can better understand this. Keep in mind you don't have to convince me...

chilly siloBOT
#

Your original proposal appeared to me to impose additional, external conditions, terms, or policies on bot users supplementary (rather than complementary) to the Discord ToS and privacy policy:

Of course, it wouldn't be good enough to just have the fields in the application settings. Discord should use the links provided to notify the user via the authorization flow to let users know that the application/bot they are authorizing is subject to additional terms and policies.

That is wha...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Hello, I am having some problems with a bot coded in python, the problem I'm facing is that when I turn on the bot all seems to works good, but after a time working (aproximately 12h) It suddenly shut down with this error:

Traceback (most recent call last):
  File "/home/diego_cuenca_prieto/.local/lib/python3.5/site-packages/discord/gateway.py", line 470, in poll_event
    msg = await self.recv()
  File "/home/diego_cuenca_prieto/.local/lib/python3.5/site-packages/websockets/protoc...
chilly siloBOT
#

@SinisterRectus I'm not suggesting that bot developers impose additional terms and policies because this can be done already and often is with large bots. The issue is that end users don't always receive proper notice that adding a bot is subject to those terms and policies. Put another way, my proposal would allow users to receive notice when additional terms and policies exist before adding a bot to a guild instead of no notice at all. It's better for everybody if end users receive this not...

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

@spotlightishere โ€‹โ€‹โ€‹แ ŽWhat the fuck did you just fuckiwg say about me, you wittwe bitch? Iโ€™ww have you kwow I weached the top of the page ow FuwAffiwity, awd Iโ€™ve beew iwvowved iw wumewous secwet cowvewtiows wowwdwide, awd I have ovew 300 cowfiwmed yiffs. I am twaiwed iw gowiwwa fuwsuitiwg awd Iโ€™m the top suitew iw the ewtiwe US fuwwy fawdom. You awe wothiwg to me but just awothew weeaboo. I wiww yiff the fuck out of you with pwecisiow the wikes of which has wevew beew seew befowe ow this Eawt...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Now we're receiving presence updates from everywhere it happens.
In future presence intent will limit the bot to be in max 100 servers.

What if we could choose from which guilds (with a limit of course) we want to receive presence updates? So the bot would be in more than 100 guilds and we would get presence updates only from X chosen guilds in the developer portal and those chosen guilds could be changed only once in month to prevent fetching presence updates from different guilds just b...

#

Now we're receiving presence updates from everywhere it happens.

you already can use intents (and it's recommended)

In future presence intent will limit the bot to be in max 100 servers.

no, you just need to show how you use the intent in your verification application (which you will have to do anyway for the bot to be on over 100 servers), and you'll have access to the intent.

chilly siloBOT
#

For the API endpoints:

The endpoint above returns (No content I guess) But this should also show `{"cod...

#

guess this is just to get the token directly, how do I just get the "auth code" from react native client? I want to let user login and redirect back to my app using custom schema and then get the token via my server so I shouldn't need PKCE right? But I still get "invalid_grant" error.

the endpoint I use is this: **`https://discordapp.com/api/oauth2/authorize?client_id=${
discordApp.CLIENT_ID
}&redirect_uri=${discordApp.oauth.REDIRECT_URI}&response_type=code&scope=${
discordA...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Currently when we try to create an invite we are getting the same x-ratelimit-bucket for all channel id's. The response says we are rate limited, but not globally, but every channel from tons of servers seem to be using the same bucket.

We are using this api: POST/channels/{channel.id}/invites

Are invites from one bot request all in one bucket or should it be channel id based?

chilly siloBOT
#

I have been testing around with how many attachments you can add in a single message, and I have not been able to find one for webhook created messages. The documentation states that you can only attach one file to a webhook message, but I have been able to attach up to 44 before getting a request too large error.

There might be a limit missing in the API, and if there is, that limit should get documented.

chilly siloBOT
#

I think the descriptions for the priviledged intents on the developer portal could require some Tweaking, to make it more clear, if you need it for your bot or not.

The descriptions should perhaps provide some common cases, where this intent would be required to have.

Example with Member Intent (assume the markdown being formatted on the site):

If your bot tracks server members or downloads the entire member list, you may need the server members intent to receive member events...
chilly siloBOT
chilly siloBOT
#

Here's what I'd like to be able to write:

sealed trait PartialGuild {
  val name: String
  // ...
}
case class GuildOutbound(
  name: String,
  // ...
) extends PartialGuild
sealed trait ExistentGuild extends PartialGuild {
  val id: ULong
  // ...
}
case class GuildPreview(
  id: ULong,
  name: String,
  // ...
) extends ExistantGuild
// ...

Or in Haskell:

data Guild = Exists ExistentGuild | Outbound GuildOutbound
data ExistentGuild = Visible Visi...
chilly siloBOT
#

DiscordHTTPS401 unauthorized on POST

Me and my engineering team are trying to solve this 401 error we are getting from implementing discord bot through gcloud functions.

Essentially the service is to send automatic messages to our chat server through the bot listener.

Our naive approach was to reconnect with the discord listener and try to re-send the message if there was this error, however as expected that discord automatically ban it since it tried to connect above the 10...

#

i'm not familiar with the library you're using, but typically a 401 error means you're not sending an authentication header.
if you're authenticated to the websocket (if that's what you mean by the bot listener), that won't help in sending messages as they are sent separately - through the HTTP API. you need to include an authentication header into your http request

either way, why not just use a webhook if you need to send automated messages to a channel?

chilly siloBOT
chilly siloBOT
#

See #1304

I contacted support about this a few weeks ago and received the following response:

"I've shared that information with our engineering team to further our investigation along. Sadly, we don't have an ETA for when this issue will be fixed, but rest assured that we'll share an update on our status page when a fix has been rolled out." 18 days ago.

I figured I contacted the wrong support (support@discordapp.com) and figured I'd give it a shot here from the recommend...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Some servers interact via the nitro path, and the programming owners took advantage of these activities, so they made programming codes called the nitro sniper. This tool is used while setting one of the nitro on the chat. The account takes it automatically.
I hope the reporting will be useful and thank you ..

#

When some discord servers interact, you do the work of Giveaway so the owners of programming take advantage of this opportunity and create a programming code that works to automatically subscribe to the Giveaway even if your account is not connected to the internet
I hope that this information will be useful to you

My Discord Tag : !-Bรธรธฤรฝ หขสฐแตƒแตˆแต’สท#3091

chilly siloBOT
#

I'm trying to understand this. So the hash method would be what? md5?

hash("POST:/channels/{channel.id}/invites") + 2562130032120454266 I just want to make sure I understand this right.

We are hitting the rate limit trying to generate invites for tens of thousands of Discord servers. These are per request by interested users.

chilly siloBOT
chilly siloBOT
#

Following #1544 I would like to request an other thing regarding webhooks.
Since it appears we can now use custom emoji from guilds the bot is in when sending a webhook, it would be very nice to have the same thing for webhook's username.
We can already use default discord emoji but custom one would be helpful as well.

My use case is a cross-server system that relay messages via webhooks accross several guilds. Using custom emoji from these guilds in webhook's name would be neater to id...

#

I suppose that's fair. To clarify, though, my thinking was more along the lines of not removing it, but changing it from "BOT" to something else. For example, I'm echoing chat from a game on Kongregate, so I'd change the text to the letter K and the background colour to Kongregate's red:

<img width="234" alt="Screenshot 2020-04-28 at 11 14 06" src="https://user-images.githubusercontent.com/1826067/80476145-e40a9600-8941-11ea-9e34-2163b017875a.png">

This would be way less confusing than ...

chilly siloBOT
#

Whenever you make a request to an endpoint you receive the hash for that route with the X-RateLimit-Bucket header. Then you store it somewhere in a key-value map like

hash["POST:/channels/{channel.id}/invites"] = headers["X-RateLimit-Bucket"]

Then you can use this hash for future requests by doing

bucketId = hash[request.route] + "-" + request.major

To calculate the specific bucket for your request. The hash will be the same for routes that share a rate-lim...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

It would be pretty nice if when you request the 'guilds' scope there was a method of retrieving the full member objects in servers the connected bot is in.

This would be useful for a web dashboard so you don't have to cache every member just in case they happen to use a web dashboard and need to fetch individual permissions to see if a user is allowed to interact with certain features.

Whilst this wouldn't remove the need for the GUILD_MEMBERS intent, it could definitely reduce the need...

#

Personally I'd be fine keeping channels cached as there are significantly fewer of them than members.
I'm mostly trying to avoid sending off a maximum of 100 requests for roles whenever someone looks at my dashboard.

At this point, it would be also be helpful to just have a boolean specifying if my bot is also in the server so I don't have to iterate through them all to find matches, which might be possible given I've heard mutual servers with bots might be coming on the user side.

chilly siloBOT
chilly siloBOT
#

The documentation for Create Guild (/guilds endpoint) states both of the following:

Assigning a channel to a channel category is not supported by this endpoint, i.e. a channel can't have the parent_id field.

When using the channels parameter, the id field within each channel object may be set to an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to create GUILD_CATEGORY channels by setting the parent_id field on any children t...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#
z64

Around #1307, there was a compatibility change made that can propagate USER_UPDATE events into GUILD_MEMBER_UPDATE events.

If an action that triggers a USER_UPDATE occurs before guild streaming, USER_UPDATE appears to always be held until after it finishes. However, the propagated GUILD_MEMBER_UPDATE event can be received before any GUILD_CREATE, meaning guild_id will be unknown to the client.

Should dispatch of this event, if possible, be held until the client has had...

chilly siloBOT
chilly siloBOT
#

If I make an HTTP/2 request to DELETE /api/v6/channels/123/messages/145/reactions, and I give a Bot token that has been revoked today, I get a 429 Too Many Requests response with the following body:

HTTP/2 429 
date: Thu, 30 Apr 2020 15:21:14 GMT
content-type: application/json
content-length: 89
retry-after: 387
strict-transport-security: max-age=31536000; includeSubDomains
x-ratelimit-global: true
x-envoy-upstream-service-time: 15
via: 1.1 google
cf-cache-status: D...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

This is a very very nice feature. Maybe it could even be optional? This would give much much more sense of security to larger bots, and "dont leak your token" isn't a very valid argument, considering, you could say the same about 2FA. "Just dont leak your password and email", but we still all use 2FA, as it's a good practice to keep us secure.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#
z64

I can grab exact logs later, but the general timeline a user experienced was:

  1. Establish a socket connection to the gateway.
  2. At any time between this and the first GUILD_CREATE, issue PATCH /users/@me to update the bot's name.
  3. We observed the following event timeline:
  • READY
  • GUILD_MEMBER_UPDATE for guild_id: 123 (not cached yet!), for the current user
  • GUILD_CREATE for guild 123
  • [...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#
z64

It is difficult to provide guidance with very little details.

  • Are you using an existing library for making Discord bots? If so, you should reach out to their support if you are having difficulty passing a valid token string, and debugging it if it failed. They will be able to help you much more efficiently than we can in a thread here.

  • If you are not using an existing library, what request are you making? What endpoint are you using, and what headers are you sending? Or are you fail...

#

@VictorienXP the function HTTP() from Garry's Mod does support cookies. It just does not support multiple cookies set by the server during the same call because the response headers are contained in a key-value table (aka. hashtable / dictionary), so only 1 Set-Cookie header remains.

My current suggestions are, if more that 1 cookie is set in the response:

  • making a proxy server that takes care of cookies (using for instance a small Python script)
  • making a binary C++ module that i...
chilly siloBOT
chilly siloBOT
#

From the time I initially made this issue, I have seen the following workarounds:

1 - Route requests through a proxy server (like @EstevanTH said)

2a - Use a websocket binary module, like gwsockets

2b - A friend of mine recently made a library based off this method, which may interest you, called discord.glua

3 (untested) - There is a 64 bit version of the Garry's Mod client and server in the w...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Like I said I'm mostly complaining about the fact that we need to add extra steps for something that used to be simple and straightforward...

I was just looking to do some simple webhook executions and nothing more. Nothing fancy. But no I need to basically rely on a third party anything to make the call for the script... I'm just saying it's dumb.

_Anyway yeah now that I think about it, if the header names are directly in keys it's bad for all those non unique headers. I see now how I ...

#

Valve/Steam HTTP Client 1.0 (4000) is deliberately blocked due to abusive traffic patterns spread across a variety of clients. It's the same reason Roblox/WinInet is blocked as well.

People distribute bad (not necessarily malicious, but... poorly coded) scripts that do stuff like poll for messages, or spam webhook requests.

Since these scripts were distributed to end-users and not run on a single server - we were not really able to ban say "one bad server sending us requests" beca...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Doing this with chunking is not a pleasant experience since you need to filter by name and discriminator on top of having to wait for the gateway response. It would be amazing if we could retrieve users by the discord tag directly, similar to how we can retrieve them by idโ€”the same for getting members.

This would be extremely useful for many bots that accept discord tags as input. Currently, you have to use chunking queries and filter them.

chilly siloBOT
#

In my testing, I consistently get a global rate limit response of 30 minutes when I update the voice region of a guild 10 times.

Example response:

date: Sat, 02 May 2020 19:29:19 GMT
content-type: application/json
content-length: 94
retry-after: 1614885
x-ratelimit-global: true
x-envoy-upstream-service-time: 103
via: 1.1 google
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Hi!
I use the discord.js library.

As I was trying to make my bot mention a role (that, btw, was mentionable by everyone, and my bot had all the perms), something unusual happened:

At first glance, the role was mentioned: the blue-text-layout-ui-stuff was here, but the thing is that the role itself wasn't truly mentionned, nobody was pinged. Moreover, the blue text wasn't hoverable or clickable. Just like a classic text. [Here is a screenshot of this sort of 'semi-ment...

#

Changes the C# Binding example for "returning normally" to include the OnCurrentUserUpdate Function as GetCurrentUser will otherwise return null.
Prettier-ed the same OnCurrentUserUpdate Function in Users docs page. Re-submitting Lobby Example and Overlay Toggle Examples in this as well.

(NOTE: Guild.md and Opcodes_and_Status_Codes.md may or may not have been altered unintentionally if so, I will re-fork.)

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

Not sure if my suggestion is the best way to fix it, but the addition of bot verification under number 3 seems a bit out of place. Possibly would be better for an info section (like in some of the other sections within the docs) rather than adding it to the numbered list.

> info
`> After October 7, 2020 any bot that wishes to grow beyond 100 guilds will need to apply for verification. A bot is able to submit an application for verification once it is in at least 75 guilds and must als...

chilly siloBOT
chilly siloBOT
#

I've made a Cloudflare worker and i'm trying to request some content from Discord.

i.e. this url for example (it's a picture of a dog)

https://cdn.discordapp.com/attachments/604977863564722178/704048262067519578/image0.jpg

Works fine in any browser, however when I fetch it from a Cloudflare worker I get the message:

"This content is no longer available." along with HTTP 403

Has Discord blocked Cloudflare worker's fetch IP of 2a06:98c0:3600::103? If so, why?

chilly siloBOT
#

I am running into massive problems in attempting to both give and remove a role from a user. Whenever I attempt to remove or add a role to a user through my BotUser, I am hit with a 10011, Unknown Role Error.
https://gyazo.com/f7666f5131acf2f9fadd1815ef061574 (Ignore the Missing Permissions Command)
All of my ID's are proper, and I attempted this through just API utilization through cURL, and that also responded with the same error as above.
All information pertaining to the Guild and the...

chilly siloBOT
chilly siloBOT
#

Our CDN is not a general content CDN, insofar as to say that it's meant to host content within the app, and not for other websites. As such some restrictions apply, wherein we try to block various methods of proxying requests in an attempt to dissuade using our CDN as a general storage bucket.

Well that's fair enough, but i'm confused why block only Cloudflare workers? Content can still be fetched from Google Cloud Functions, and AWS Lambda afaik

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

ok

ฮฃฯ„ฮนฯ‚ ฮ ฮฑฯ, 8 ฮœฮฑฮ 2020 ฯƒฯ„ฮนฯ‚ 10:13 ฯ€.ฮผ., ฮฟ/ฮท Tarek notifications@github.com
ฮญฮณฯฮฑฯˆฮต:

You and your friend should receive an invite on your account's email
address.

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/discord/discord-api-docs/issues/1595#issuecomment-625673891,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AN4FXHREXXITQ2K7YHG66ODRQOWIRANCNFSM4M36K6UA
.

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

Steps to Reproduce:

  • Set up a webserver
  • Put an image file on it
  • Link the image on discord
  • Monitor the requests

Expected Result: All the requests to generate a preview use the Discordbot user-agent

Actual Result: Only the first request has the Discordbot user-agent Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com), the ones after that are Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0 which seems very arbitrary.
...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

This is regarding #1396

The 60-day deprecation period is over, but mentions still seem to require "Allow anyone to @mention this role" to be turned on for pings to happen.

I have tried

{
	"content": "",
	"allowed_mentions": {
		"roles": ["388528223647956993"]
	}
}
{
	"content": "",
	"allowed_mentions": {
		"parse": ["roles"]
	}
}

but both does not ping the role unless I allow anyone to @mention the role, even when the bot sending the messa...

chilly siloBOT
#

Suggestion to make the channels fields table split up into a table for each "subclass" of Channel that is provided. Currently, it is very difficult without relying on the examples which currently have undocumented fields in to tell what fields we should actually expect to be present.

For the sake of slight information redundancy, this section would be much simpler if each channel type was considered it's own type of entity. Anyone using an object oriented language who isn't just using a ma...

chilly siloBOT
#

@davfsa I think you misunderstood his case.

  • The role doesn't have Allow anyone to @mention this role enabled
  • But the bot has the Mention @everyone, @here, and All Roles permission.

In this case, when passing the appropriate allowed_mentions, the bot should be able to ping the role.

Allowing to mentions any roles when you have the MENTION_EVERYONE permission was temporarily disabled for bots because some bots started to unexpectedly ping roles as a side effect of this...

chilly siloBOT
#

@davfsa I think you misunderstood his case.

* The role doesn't have `Allow anyone to @mention this role` enabled

* But the bot **has** the `Mention @everyone, @here, and All Roles` permission.

In this case, when passing the appropriate allowed_mentions, the bot should be able to ping the role.

Allowing to mentions any roles when you have the MENTION_EVERYONE permission was temporarily disabled for bots because some bots started to unexpectedly pin...

#

Similar to muting members in voice channels, simply having a way of removing someone's SEND_MESSAGES permissions in all of a guilds textchannels regardless of role permissions or channeloverrides.

This would remove the need of having to clutter your guilds with a mute role and having to mess with permissions for said role to work properly.

This would also very much simplify mute commands on bots

#

When you not have access to the PRESENCE intent (just like me) then you'll face minor issues in combination with caching/chunking of Members.
Some library, like JDA for example, mainly use the PRESENCE option to chunk members based on their online status (afaik).

While you can retrieve members on alternative ways (Requesting the info through a REST call/action) does it have disadvantages like longer loading times and - in my case - hitting the rate limit quite fast when the bot is startin...

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

This is a request to revisit the functionality/structure of an emoji passed in a reaction.

The current rules appear to be that you will pass me an animated field with the emoji, except on reaction add events, etc.

This currently makes using this data fairly awkward, as you can't do much with the emoji without being able to deterministically say if it is animated or not.

Consider a trivial piece of pseudocode that sends a message for every reaction sent.

message := api.creat...
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

When you pin a message on Discord, a message is created informing the channel that the message has been pinned. It looks somewhat like this:
Sebastian has pinned a message to the channel. See all the pins.

I see there's three potential options for dealing with this:

  • Make the pin message endpoint return the alert message id
  • Add an optional parameter to the pin message endpoint to prevent the creation of this alert
  • Both of the above
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

oh i already reported the bug

On Mon, May 11, 2020 at 7:23 PM PixeL notifications@github.com wrote:

Head over to the testers server listed above and then go to the channel
labeled #report-a-bug, there are instructions on how to do so.

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/discord/discord-api-docs/issues/1596#issuecomment-626642551,
or unsubscribe
<https://github.com/notifications/uns...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

A couple Eris users have encountered odd behavior from the gateway during the RESUME handshake, with reports starting from about 3-ish weeks ago.

Sometimes, when attempting to resume a gateway session (commonly due to receiving an OP:7 RECONNECT from the server, unknown for other packets), the session seems to get bricked, and all future OP:6 RESUME packets with that session's ID receive a WS close 1006 (connection reset) from the server in reply. This happens for all RESUME attempts made ...

#

This 1006 issue is already fixed pending deploy (dyno escalated to us a couple weeks back), and is a gateway crash caused by a bug in our code.

The underlining reason this crash is triggered is because eris is heartbeating before RESUME succeeds. This shouldn't be an issue because of how we documented heartbeating, but the server will mark your session invalid in that situation. Another change pending deploy will ignore heartbeats send to your session during a RESUME.

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

@SinisterRectus what that do?

This endpoint is used by the client when you push the "Follow" button in announcement channels. Basically it creates a webhook in whatever channel you want that will broadcast announcements from the source channel.
POST /channels/{id}/followers with a body containing an object with a webhook_channel_id property set to the ID of the target channel
You need the Manage Webhooks in the target channel to perform this

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Currently, you need the GUILD_PRESENCES intent to access any presences, even a specific member's, because there is no endpoint to get a member's presence. #666 previously requested a presence endpoint, but it was closed due to #1116, which does let you get one member's presence. However, getting presences via this is locked to bots with the intent, likely because you can get many members using this. Since many bots just use presences for a command like userinfo, which only needs getting one m...

chilly siloBOT
chilly siloBOT
#

In general this is probably consistent behavior because when you connect to a guild your session updates sale member/presence data. You would see the same behavior if you were completely offline and made a change to your user, and came online. If there's a change in the member object during a connection it would generate a GUILD_MEMBER_UPDATE event, and then reply to your connect with a GUILD_CREATE. we can look into fixing this, but imo low priority given our gateway has been coined as event...

#

This is unfortunately a "probably never" kind of situation, since this limitation is due to legacy database structuring/limitations. I would recommend rethinking the feature you are trying to build to work around our existing limitations, which we have documented.

As has been said in other replies on these issues, we do not know if a reaction is animated or not in a reaction's metadata, and storing this value is not currently possible without a lot of work. Querying for this unknown data...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Currently, a Discord bot can know its guild count by looking at how many guilds it has in its cache.
However, not all sharded bots are able to communicate (maybe because they don't need it, or there are infrastructure limitations) which makes knowing the global guild count a bit tricky.

It could also be an issue if an external service (dashboard ?) wants to get the guild count without having to communicate with the bot itself (what about possible outages).

We can estimate that count by...

chilly siloBOT
#

We can estimate that count by multiplicating a shard guild count by the number of shards, but that's still an approximation that might be wrong. If for whatever reason a bot has to get an exact count, the shards must be able to communicate between them.

We do something similar on our end as well. The exact count of bot guilds is unknown once a bot gets large enough.

We can definitely provide an approximate count, but not an exact count.

#

We can estimate that count by multiplicating a shard guild count by the number of shards, but that's still an approximation that might be wrong. If for whatever reason a bot has to get an exact count, the shards must be able to communicate between them.

We do something similar on our end as well. The exact count of bot guilds is unknown once a bot gets large enough.

We can definitely provide an approximate count, but not an exact count.

I understand ๐Ÿ‘Œ
In that case yeah ...

chilly siloBOT
chilly siloBOT
#

This doesn't capture the nuance though. Because really it's based on the shard rate_limit = shard_id % max_concurrency

So, if you had a max concurrency of 16, and 16 shards for example, you could start them all up at the same time.

Whereas if you had 32 shards, if you tried to start up shard 0 and 16 at the same time for example, it would not work. You can start shards 0-15 concurrently, then 16-31...

chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

https://discord.com/developers/docs/reference#nullable-and-optional-resource-fields-example-nullable-and-optional-fields

? at the end of the field name indicates it as optional, but it isn't necessary here because it already says that all fields are optional.
? at the start of the field type means it is nullable (you can pass null to it), you can't set the name or type of a channel to null.

#

Ah, okay.

I'll have to investigate this more then. I'm using a library to send a request to modify the channel topic, and if I don't provide both the name and type with the request I get a 400 and an error response stating that I'm missing the fields (see https://github.com/twilight-rs/twilight/issues/149). If I set the fields along with the topic, everything works fine.

I don't have time to explore this more right now but I'll dig into this when I get the chance and see if I can fi...

chilly siloBOT
#

Found the problem. The library was sending the name and type fields as null if they weren't set to a value in the builder.

[05-14-2020][10:23:15 PM][twilight_http::client][INFO] Ok(
    "{\"bitrate\":null,\"name\":null,\"nsfw\":null,\"parent_id\":null,\"permission_overwrites\":null,\"position\":null,\"rate_limit_per_user\":null,\"topic\":\"Cldfire is playing Minecraft\",\"user_limit\":null,\"type\":null}",
)

It would be nice if the API returned a more accurate error (`Fi...

chilly siloBOT
chilly siloBOT
#

how exactly does this go against privacy? it is perfectly possible (even without any intents) get this info, you just need to get a list of servers your bot is in (gateway send you all of them after you identify) then just use the get guild member endpoint (or request over the websocket) to know if the user is in said guild or not

oauth on the other hand gives a full list of servers the user is in, including the ones your bot is not in

chilly siloBOT
chilly siloBOT
#

A bot dashboard is my use case..

I've personally never been a fan of the guilds scope, because it gives people info about guilds their bot is not even in. And I don't feel very comfortable putting other people in that position either.

So atm, I rely on the GUILD_MEMBERS privileged feature to iterate through guild members and see if x ID is in there. Even if it's not possible to provide full guild objects, partial works fine for my use case as well.

#

At the moment, my use cases are a bot dashboard as well as certain features which depend on the other servers a user is in to determine functionality.
For my particular case, I need to know the mutual guilds without oauth, so even using the guilds scope is out of the question.
For me, either a rest endpoint or a gateway opcode would help, as I need to do this with relative frequency, but not with a majority of my users to make it worth caching everyone if I don't need to

chilly siloBOT
#

That's just you assuming everyone has access to my bots oauth page. Private
stuff shall stay private.

On Fri., May 15, 2020, 01:14 Advaith, notifications@github.com wrote:

Users can access it anyway on the OAuth invite page, this would just be to
access it via the API

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/discord/discord-api-docs/issues/1628#issuecomment-628934294,
or unsubscribe
<https://gith...

chilly siloBOT
chilly siloBOT
#

So atm, I rely on the GUILD_MEMBERS privileged feature to iterate through guild members and see if x ID is in there.

At the moment, my use cases are a bot dashboard as well as certain features which depend on the other servers a user is in to determine functionality.
For my particular case, I need to know the mutual guilds without oauth, so even using the guilds scope is out of the question.

Sure, I totally understand the technical bits of this. My question is like, what is the fea...

#

For my dashboard, I need to show a list of servers the user has permissions to manage, to the channel level. At the moment, I cache guilds, channels and members and create a subset of guilds/channels the user is allowed to manage.

In terms of outside the website, I use the mutual servers to work out emotes are in the servers a user shares with the bot to present them in a default interface without the user needing to interact with the bot.

#

I would assume something like Taarek's usecase would be that in their dashboard, for example a configuration screen, it would be able to show all guilds that the user can configure and that they share with the bot. That way, you don't have to iterate through any shards (which can be problematic if some are offline) or requiring the user to authorize via OAuth2 the guilds scope. Such a dashboard does not require all the guilds a user is present in

chilly siloBOT
chilly siloBOT
#

ููŠ ุฌู…ุนุฉุŒ ูกูฅ ู…ุงูŠูˆุŒ ูขู ูขู  ููŠ ูง:ูฅูฃ ู…ุŒ ูƒุชุจ Vlad Frangu <notifications@github.com

:

Title says it all. According to the docs
https://discord.com/developers/docs/topics/gateway#message-delete-bulk-message-delete-bulk-event-fields,
the guild_id field is optional. We cannot run bulk deletes in DM
channels, so when can guild_id not be returned? Or do the docs just need an
update?

Thanks!

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email di...

chilly siloBOT
#

how exactly does this go against privacy? it is perfectly possible (even without any intents) get this info, you just need to get a list of servers your bot is in (gateway send you all of them after you identify) then just use the get guild member endpoint (or request over the websocket) to know if the user is in said guild or not

oauth on the other hand gives a full list of servers the user is in, including the ones your bot is not in

It is one thing to have lists of guilds that ...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Right now bots are able to create group DMs between users using the oauth2 flow (which they can DELETE and GET but cannot access through other methods from what I could tell) but there is no way for bots to get a list of their open group DMs which, unlike normal DMs, bots are limited to having 10 open; with the group DM limit bots have to track what group DMs they have open so they can close them when necessary to free up slots.

If a bot were to fail to keep track of an open group DM (say ...

chilly siloBOT
chilly siloBOT
#

As far as I'm aware, the reason this is locked behind a whitelisted intent in the first place is so that it's much harder to harvest presence data without Discord knowing. Even if there was a very high ratelimit, as in something like 1 request/60s or something of the nature, I don't know that Discord would want to allow it anyways since that would still allow harvesting, even if slowly.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

It's not necessarily just a question of privacy. Recall that the original reason to restrict presence intents was technical, namely a want to avoid the bandwidth/processing costs of distributing updates to large bots.

It's easy to imagine that as a matter of systems architecture, data about presences simply might not exist in a location where the servers that answer REST requests can get at them. There's a lot of churn in these data (e.g. every time someone foregrounds or backgrounds D...

chilly siloBOT
#

The user-agent is supposed to show what application is requesting the page. It has nothing to do with whether or not it is "acting in response to a user". The current user-agent does NOT accurately represent the application making the request as I highly doubt your servers are running MacOS.

Also as the two user-agents are different it causes bugs when generating previews as some websites will display an image for bots to create previews but display a webpage if a browser is making the req...

chilly siloBOT
chilly siloBOT
#

@ziad8727 I think you're misunderstanding. I was trying to say that an endpoint to get one user's presence would sort of defeat the purpose of GUILD_PRESENCES being behind a whitelist, as while you can no longer get all presences in one call, you would still be able to eventually harvest enough presence data (even at a slower speed) to be a problem.

This has very little to do with the member list. If Discord wanted to restrict the member list with that intent, they would have done so. My...

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

Discord has already permitted most of Unicode to be used in text channel names, so it seems quite arbitrary that capital letters and spaces are still banned. It used to be possible to use alternate Unicode spaces, such as \u2009 to put spaces in channel names, but that has also been blocked now. From an API standpoint, these characters should not be problematic. Discord clients handle old channels that still have Unicode spaces correctly as well, so it's not a parsing issue. Actual spaces s...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

A) this is the discord api and only for reporting bugs with the api, not for help with making a bot or using the discord api.

B) since youโ€™re using a cloud function and only seem to be sending messages, why do you even need to maintain a short-lived websocket connection? You could pretty much just make a request to the rest api and check the response. I donโ€™t see why you would need to identify with the gateway.

chilly siloBOT
chilly siloBOT
#

In json for server widget field "discriminator" always contains 0000 for all users instead of real discriminator.

Examples:
https://discordapp.com/api/guilds/273002130997116939/widget.json
https://discordapp.com/api/guilds/500334341176426506/widget.json

{
         "id":"23",
         "username":"Se7en",
         "discriminator":"0000",
         "avatar":null,
         "status":"online",
         "avatar_url":"https://cdn.discordapp.com/widget-avatars/UP-c2la2hTdHjKdocC2...
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

To add embeds in a link. You have to add meta tags.

<meta property="og:title" content="Site Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://my.site.com" />
<meta property="og:image" content="http://my.site.com/images/thumb.png" />
<meta property="og:description" content="Site description" />

This will make a embed for your link.

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

Can we please make separate permission for bots sending embeds. Especially with the new features showed off recently using embeds I expect even more bots to use embeds meaning more bots are going to require EMBED_LINKS

Right now bots require EMBED_LINKS in order to be able to send embeds. A lot of bots possibly the majority are using embeds and this means every server is most likely granting EMBED_LINKS. Although this is relatively harmless, it could actually become potentially harmful bec...

chilly siloBOT
chilly siloBOT
#

I'm not sure how I feel about bots being allowed to send embeds no matter what. It stands to reason that the same reason why embeds might be harmful when users post them also applies to bots. I do agree that the "Embed Links" permission is a bit much and I wish there was a bit more flexibility.

What about a guild setting that controls whether or not bots are allowed to post embeds inside the guild? This would effectively make the permission "Embed Links" only for links (as the permission i...

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

Hi there,

I just discovered that mentioning an user who's not in your guild, right-clicking them and choosing "kick" works, even though the option shouldn't be there in the first place. However, I can't report this to Discord Testers since you consider this NAB in the client (which I disagree on).

I did however open the network tab and repeat this procedure to see if there at least was an API error happening when you attempt to delete a non-member from a...

chilly siloBOT
#

Hii
i can't install discord.js
`โ– โ•ขโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ•Ÿ
WARN engine discord.js@12.2.0: wanted: {"node":">=12.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
extract:stable โ†’ gunzTarP โ– โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ...

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

This appears to be a bug in how the website represents a dodgy URL.

The example is as follows. Try to hit https://discord.com/oauth2/authorize?client_id=572144340277919754&scope=guilds.join&redirect_uri=example.com.

Sure, this may be invalid (at the time of writing I am double checking as to what the issue is, most likely I have misread something in the documentation... that is beside the point), but the response I get is far from any help on this matter.

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

#

The OAuth2 API at https://discordapp.com/api/oauth2/authorize now redirects to https://discord.com/oauth2/authorize per the DNS change (the /api/oauth2 has become simply /oauth2).

The issue is that, whilst not invalid, the scope generator on the dashboard still points users to the initial route, for example: https://discord.com/api/oauth2/authorize?client_id=572144340277919754&redirect_uri=https%3A%2F%2Fgoogle.com&response_type=code&scope=guilds.join ... reducing the number of unnecessary ...

#

https://discord.com/oauth2/authorize?client_id=572144340277919754&redirect_uri=https%3A%2F%localhost&response_type=code&scope=guilds.join

image

Assume this is not meant to happen either? Raises a Cloudflare 1101 "Worker threw exception" for me, with a prompt telling me to log into cloudflare to fix the issue, which I don't believe I will have permission to do :smile:

| CF Ray | 5...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

Hello, I was told by B1nzy from the Discord API server to open an issue regarding MESSAGE_UPDATE event. I'm not sure if this is the correct repository since I looked through all repos and found this may have been the most appropriate one to post this in.

Basically when I am hitting the PATCH/channels/{channel.id}/messages/{message.id} endpoint, if I send a MessageEmbed as the payload, it will fire 2 MESSAGE UPDATE events. If I send just content (edit the content of msg) it will fire it o...

chilly siloBOT
#

@night yes, and it redirects to that, so it is a bug, surely?

I dont see why this is closed before any clarification can be given on the issue... seems a little counter intuitive.

I am a bit lost since you just said in my other issue to expect it to always redirect to here, so it feels like catch 22 if we are not meant to use the URL your web service is redirecting us to?

What relevance does this have to the fact an invalid redirect URL triggers this? Isn't this just hiding the problem?

chilly siloBOT
chilly siloBOT
#

When trying to turn on MFA in a guild owned by a bot through the api, the api responds with "Two Factor is required for this operation." It could be seen through api calls to /users/@me that MFA is enabled in a bot account. Is this a bug?

Request URL: https://discord.com/api/v6/guilds/{guild id}/mfa
Method: POST
Body: {"level": 1}

Response:

{"message": "Two factor is required for this operation", "code": 60003}
chilly siloBOT
chilly siloBOT
chilly siloBOT
chilly siloBOT
#

This is the normal behaviour. They told me, they are working on this already. This was a long time ago and they actually fixed one of many weird behaviours. Also here are my notes about handling this behaviour:

How can you know whether a MESSAGE_UPDATE event is not a real update event:

  • The payload has no edited_timestamp included.

What is the difference between the two payload:

  • If the source message is sent (or edited) with links, then the next MESSAGE_UPDATE will ...
chilly siloBOT
#
  • Removed documentation for the bulk_delete endpoint. This has been marked as deprecated
    for like two years. No point encouraging users to even consider it exists anymore. If a user
    has not read these docs for two years, their implementation most likely no longer works
    anyway...
  • Added notes about proxy_url, height, width to embed documentation directly, since it should
    be kept with the other information about embed constraints for consistency.
  • Converted deprecatio...
chilly siloBOT
#

@advaith1 true, I mostly added it to try and erase confusion on what constitutes as an admin action. Partially since while this isn't documented, it could theoretically be changed without notice in a way that could break some bots that rely on that functionality to work in a useful way.

The reasoning behind the choice to dupe this per endpoint was inspired by the duplication of the...

> info
> All parameters to this endpoint are optional excluding 'name'

...message despite bei...

chilly siloBOT
#

Just as a note, I've added documentation for modifying and accessing group DM icons but there seems to be some funky behaviour around group DM channel icons; the group DM's icon hash seems to be defaulting to the application icon hash of the application that created it (with this being valid on the "app-icons" cdn endpoint but not the "channel-icons" endpoint) with all modifications to it changing it from an app-icon to a channel-icon.

I'm not entirely sure if this is intended behaviour or...

chilly siloBOT
chilly siloBOT
chilly siloBOT
#

You don't get a response by sending a WebSocket message (it's not like HTTP requests you can make on REST APIs).
I assume you're using Deno according to the "mod.ts", if that's the case this method isn't supposed to return anything in any way.
To check if the WebSocket connection is alive rely on the heartbeating.

How not? In the print below he returns me a json with some information ..
![image](https://user-images.githubusercontent.com/42474938/82760917-14bcde80-9dcd-11ea-86e2-c0...

#

Starting over. In the last print above I am absolutely sure that he returns something to me, if he returns something to me op 2 should also return something to me, it is what is written in the documentation, I tested it and it does not work with op 2 only returns me in op 4, Why op 2 doesn't return anything to me, while op 4 returns something to me.

One more thing: assuming that websocket.send does not return something (but it should), after .send I already have all the .on (event, callbac...

#

This isn't a complaint at this PR, but a question for the next employee who reads this, if it is read.

At this point, would it be more helpful to have separate tables for each type of channel? As a developer, this kind of merged information makes writing distinct entities for each type of channel incredibly awkward and a case of trial and error. Since general programming paradigms encourage separation of concerns, that would likely be of much more use. Especially since the majority of pro...

#

I can agree that a separation could be beneficial towards having an easier to understand documentation.

Towards your questions;

  • News channels are - in most basic terms - just fancy Text Channels with the option that you can post news to following Guilds. Most libraries I know just treat News Channels as normal Text Channels as they, from what I know, don't offer any specific functions for bots that would be different to normal Text Channels. So yes, you could pin messages in that channe...
#

In the last print above I am absolutely sure that he returns something to me
Again, this is not possible in a classic WebSocket connection.
The standard ws library for Deno clearly states WebSocket#send returns a Promise with nothing inside.

If you are sure resx contains a payload, it means you are not using the WebSocket directly and therefor we can't help you if you don't tell us what you are using.

#

no clue for JS, but for Python, we'd just make an Event object which is just a collection of promises (well, futures), and set that when said event occurs.

This is more a javascript question; but you probably can make a future/promise/whatever, save it somewhere, and just set it to completed when you receive whatever you want.

Websockets are not like HTTP requests. They are not a request/response situation. They are like two people talking down a telephone at eachother. One person has t...

#

You don't. You can rely on events that should come after them tho.
For example, an heartbeat command should be followed by an heartbeat acknowledgement ; an identify payload should be followed by a READY event (or a WebSocket closure if something in the payload was invalid) ; etc...

You should listen to incoming messages as I said.
If you identify (OP 2) you receive READY few moments after.
If you change your voice state (OP 4) you receive a [Voice State Update event](https://dis...

chilly siloBOT
chilly siloBOT
#

Discord Testers since you consider this NAB in the client (which I disagree on).

It isn't technically a bug as far as they will say for the client, since the client doesn't load all members in a guild. It only loads the members online. They implemented this a few years back to reduce load, and it has caused a load of weird issues in the API like mentions showing up as @invaliduser if the message suppresses mentions and the user is offline; and messing up mentions in embeds a lot. I guess...

#

I don't understand the language in-message, but it appears to be telling you the message that the user is not a friend or blocked you, so it is suppressed. Might be wrong if someone can translate for me.

Most likely a client bug if it is regarding the behaviour of that, but from what I can see, nothing looks out of the ordinary there.

chilly siloBOT
chilly siloBOT
chilly siloBOT
#
z64

While this is nice information to have, I would suggest simply adding a column to the Audit Log Events table, where they learn about X-Audit-Log-Reason. This is rather heavy handed / verbose for information that boils down to a "yes or no".

https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events

This will be much easier to maintain in the future and a central place for implementors to review the endpoints interaction with the audit log.

chilly siloBOT
#

Early I was confused by the examples only to later find out that the examples given weren't accuracy because in a real rate limit response, they are lowercase. I also in the process learned that the HTTP headers are case insensitive. However, I think that the examples should show what you would see in a real situation. Here's a pic of a real HTTP response with those rate limit headers:
![image](https://user-images.githubusercontent.com/16181109/82840222-d0e6d980-9e9f-11ea-8960-70781d964503....

chilly siloBOT
#

I think that the language alone should be enough information for people to find what they are looking for. Everything else they can learn by clicking the repository link. If you add a framework, do we then have to include every other compatible framework, language implementation, version, and library? For example, my library's language is Lua, but it more specifically runs on the Luvit framework, which uses the LuaJIT implementation of the language, which is compatible with the 5.1 standard. ...