cugetreg
cugetreg copied to clipboard
feat(discord-bot): Implement Discord Bot Prototype
Why did you create this PR
- Implement New Discord Bot for CU Get Reg
What did you do
- Implement Discord Bot Prototype
Demo
Checklist
- [ ] Deploy a demo
- [ ] Check browsers compatibility
- [ ] Wrote coverage tests
Please fix conflict so I can review
don't force push
Can you explain more about the features of this bot. It would be great if you put some image what bot can do here.
Please explain as much as possible you can. So, we'll review this feature later
Please fix conflict so I can review
don't force push
I merge wrong branch ;w;
Can you explain more about the features of this bot. It would be great if you put some image what bot can do here. Please explain as much as possible you can. So, we'll review this feature later
This is a prototype of a discord bot, for now it main feature is summary user usage for 1 week, however the core module of this bot support many metric and dimension for used in further.
This prototype design based on issue 439. (https://github.com/thinc-org/cugetreg/issues/439)
Example feature

What does the report look like when the bot send a it into Discord?

Look like this for example, actually it support both text message and image but text message format is not yet discuss to other, so it has core code and template for that for now. However from the code, text command can be code in very short time (estimate may be < 1 week)

The bot use slash command to register channel to send report and report will send at specific cron job time
Note that this is only a prototype of CU Get Reg Bot, for further improvement I think we should discuss for more further information to used in development
Why is there so many package.json changes (package name ordering is out of place, versions are upgraded)? That should not happen when you add new packages for your new app.
Since we're using the same package.json for every single app, changing so many dependencies could break other apps and should be avoided.
In fact, i'd say do this:
- Delete node_modules folder
- Revert package.json and pnpm lock file back to its original commit
- Selectively add new packages that you need for discord bot (prod dependencies and dev dependencies). This should NOT mess up other dependencies.
- Commit and push new package.json and lock file to this branch
Because we may have other features for Discord bot like #438, I would like you to use discord-nestjs, the powerful DiscordJS-wrapper library based on Nestjs, as a main library for implementing Discord bot. Since, Nestjs is fully come with Typescript and Decorator that make other easy to read through the code.
Here is the example repos that implemented with discord-nestjs. Feel free to copy the code from them.
- https://github.com/thinc-org/thinc-discord-bot
- https://github.com/saenyakorn/paradis-bot
hold up this might conflict package.json with turborepo migration in #470
hold up this might conflict package.json with turborepo migration in #470
do you mean hold the pull request or hold the migration?
hold up this might conflict package.json with turborepo migration in #470
do you mean hold the pull request or hold the migration?
hold the PR, as it would conflict the package.json a lot. U could keep on implementing the bot tho (like as @saenyakorn suggested), just be prepared to fix the package.json conflict
@PongDev #470 is merged.
u'll need to create a new package.json in your app directory with your own dependencies. No more piling every dependencies into single package.json at root.