Closed ArberSephirotheca closed 2 years ago
This PR checks in a .DS_Store
file despite also adding it to the .gitignore
. Consider running git rm .DS_Store
and then pushing.
More generally there seem to be a bunch of queries and mutations in the discord_associations
folder. In my opinion, these would be easier to find if they were structured according to what they act on. (i.e. any small group queries and mutations should be in a small group directory).
This PR also includes an empty file at src/discord_bot/commands/associate.rs
and a few strange formatting items. Have you run cargo fmt
?
I noticed that the RCOS API schema also changed, but I do not see any new migrations over on https://github.com/rcos/rcos-data to indicate new database structures to match. It's imperative that Telescope's API schema remain in sync with the database schema. This could be the result of updating Hasura's version in the docker-compose
file without updating it to match on rcos-data
. Worth checking for any breaking API changes before updating either.
Issue Number: close #128
Problem Summary: Add
/generate
slash command to Discord bot.What is changed and how it works?
graphql/rcos/discord_assoications, src/discord_bot/commands, src/api/rcos/discord_assoications: "generate.rs",...
generate.rs:
/generate
command./generate
command has 4 subcommands:/generate roles
,/generate categories
,/generate channels
and/generate all
:/generate roles
:/generate categories
:/generate channels
:/generate all
:/generate
subcommands in the following order:/generate roles
,/generate categories
,/generate channels
.Files under graphql/rcos/discord_assoications and src/api/rcos/discord_assoications:
Tests
Manual test:
/generate roles
in discord server./generate categories
in discord server./generate channels
in discord server./generate all
to see if it produces the same result.