tomerron / cordless Goto Github PK
View Code? Open in Web Editor NEW๐ค Declarative Discord bot framework. Build your first bot in 5 minutes with 3 lines of code!
License: ISC License
๐ค Declarative Discord bot framework. Build your first bot in 5 minutes with 3 lines of code!
License: ISC License
According to Discord documentation, the restriction of the option name is to have a length of 1-32 characters.
But when I named it with a camelcase string, eg: personName, it throw an exception.
Is this the expected behaviour?
This issue is related to the file and line below.
Hey, thanks for this package!, I saw it in Reddit a few days ago.
I'm trying to accept parameters in my bot, but i dunno understand how.
Can you gimme an example?
Greetings from Chile!
Currently e2e tests are done by creating 2 clients:
init()
discord.js
client that pretends to be a real userIn the e2e tests, these two clients "talk" to each other - for example, we subscribe the cordless bot to a messageCreate
event with a condition of message.content === 'ping'
, and test the function callbacks by having the "fake user" send a ping message and assert that the cordless bot responded with a pong.
With the introduction of Application Commands, it's not possible to test them with a bot pretending to be a user. This is because Bots can not interact with other Bots through commands.
For example, we might register a /ping
command in the cordless bot. When the "fake user" sends /ping
, it will simply send it as a message and not create the interaction. So it is not possible to assert that the command works.
Not really sure at the moment.
We could probably simulate a browser and login into a "real" user (with Cypress for example), but that would be cumbersome and definitely against the Discord ToS, so that's not a viable option.
Another option might be to query the Discord API to get back information about the bot's commands. We can create snapshots of the JSON response for different scenarios (e.g., no commands registered, simple commands, commands with options, etc). That still won't let us test the command handling itself (and anything involved in the process, like interactive buttons and how they are handled), but at least we can assert that the commands are registered properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.