Skip to content

Add structures#1

Open
CleverSource wants to merge 6 commits intomainfrom
structures
Open

Add structures#1
CleverSource wants to merge 6 commits intomainfrom
structures

Conversation

@CleverSource
Copy link
Owner

This PR will introduce structures to the library. Allowing for methods to be attached to data types such as channels (example below).

bot:on("channelCreate", function(channel)
    channel:sendMessage(`This channel named \`{channel.name}\` is cool!`)
end :: typeof(bot.events.channelCreate))

vs.

bot:on("channelCreate", function(channel)
    bot.rest:sendMessage({
        content = `This channel named \`{channel.name}\` is cool!`
    })
end :: typeof(bot.events.channelCreate))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant