Open za419 opened 3 years ago
Better instructions, since @ErikAlmaguer is extremely new to the project and to team development.
This task is part of the detailed-helptext
project, which is currently occupying dev-master
due to engineering constraints which pushed this out on the roadmap to overlap with v5 integration - so there will be some merging required.
Further references to code and line numbers will be done off the currently non-working dev-master
, at commit b881be1f6635cb015fa8e18a67c1eb2a059d0f8e.
The first step will of course be to make a branch off dev-master
, named something like detailed-helptext-stop
(whatever you want really, it's just useful to have names that mean something related to the purpose of the branch). You'll work on this branch, and eventually submit a Pull Request (PR) to merge that branch into dev-master
to render your changes an "official" part of CadenceBot mainline (eventually, once dev-master
gets updated to match current master
, the CadenceBot-dev instance you've seen will be moved over to run dev-master
in accordance with my official software development process as documented in the README.
Then, you can use several resources to try and gain an understanding of the stop
command (it's very simple, so I don't anticipate any trouble). Lines 2 through 40 of default-config.json
include some configuration of the core commands, among which is stop
. Based on that structure you could probably find where its behavior is defined in bot.js
, but to short-circuit that for you the line which recognizes whether a message is triggering the command is 684. This task is partially intended as a "warm-up", so part of the objective here is for you to familiarize yourself with the project and how things work behind the curtain.
If you have any problems with that, feel free to reach out for help and I'll give you a hand, but I doubt you'll need it.
Once you feel you properly understand the behavior of the command, you can see between configuration on lines 53 and 94 of default-config.json
of existing detailed helptext, and if you'd like (though it's a bit less direct) the implementation of the command that converts that configuration data into a message to be sent to the user in bot.js
between lines 736 and 865 how detailed helptext is written. The deliverable for this issue is another block in default-config.json
, like the ones for help
or nowplaying
, for stop
.
Unfortunately, due to the aforementioned v5 situation, we don't really have a great way to run and validate this - Normally, I'd ask that you at least test your new stuff and that it doesn't break anything else before putting our a pull request, but circumstances given, just do your best and when you think it's done, put out a pull request and I'll give you feedback including any results of an improvised test I'll put together on my own.
Short version:
dev-master
for your work.stop
command, by interacting with the bot on Discord and reading the relevant sections of default-config.json
and bot.js
default-config.json
and if necessary in bot.js
stop
command, and commit it onto your branch.dev-master
.If you have any questions, or if you have any trouble with any of this, please feel free to reach out to me or to anyone else on the team.
And, of course, welcome aboard!
Add an entry into
default-config.json
underhelpTopics
. The key should probably be 'stop', and the description should describe how one can use the command and how it will behave from a user perspective.