Skip to content

Bad Structures #51

@Darker-Ink

Description

@Darker-Ink

A lot of the Structures (main ones I can see are the channel, and possibly guild?) are formatted as if it were a normal user / bot connecting to the gateway when this is not the case.

RPC returns a LOT less data than you might expect. For example

{
  id: '365498559174410241',
  name: 'The Gearbox',
  icon_url: 'https://cdn.discordapp.com/icons/365498559174410241/a_8b7ebc6c35b4830c9645a7dc5a18c498.webp?size=96'
}

This is the data returned for when you fetch guilds and

{ id: '1138499058495918140', name: 'channel-87', type: 0 }

this is what is returned when you fetch channels (from a certain guild)

How the structures are formatted do a terrible job at.. well being structures. For the guilds if you get the access token & the guilds scope you could just fetch from /users/@me/guilds which would return a lot more data which you could have functions in place to support that if the users choose to use those functions.

As well when you subscribe to a channel (with the code for example)

client.subscribe('MESSAGE_CREATE', {
        channel_id: '1138495293453774860'
});

it works fine and all but when you want to get said messages from like

client.on('MESSAGE_CREATE', (data) => {
// other code
})

the typings don't display MESSAGE_CREATE unless I'm doing it the wrong way

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions