Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Abstract the message object #20

@tristancamejo

Description

@tristancamejo

Without abstraction it looks like this

client.on('message', (message: Message) => {
	if (message.content === 'test message')
		void message.reply({
			content: 'pong!'
		});

	if (message.content === 'test embed')
		void message.reply({
			embeds: [
				{
					description: 'hey an embed'
				}
			],
			allowed_mentions: {
				roles: ['id']
			}
		});
});

I'm wondering if we want to follow the api's snake_case conventions considering this is a JS library or if we want to further abstract it and handle converting the properties ourselves (user types camelCased properties and we convert it to snake_case). Just a thought though because using the raw API does make this a lot simpler.

Originally posted by @Nciklol in #18 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions