Giter Site home page Giter Site logo

bot's People

Contributors

14sprouj avatar thevenuz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bot's Issues

Errors running project command

[2023-01-20 21:12:35][INFO] user 816262064712187935 called project in server 841447639798251520
{"options":[{"name":"view","type":1,"options":[{"name":"shortcode","type":3,"value":"sea"}]}],"uuid":"4e8e8031-c01e-4cb3-91fb-a47cdc854201"}
{"uuid":"4e8e8031-c01e-4cb3-91fb-a47cdc854201","stack":"TypeError: Cannot read properties of null (reading 'length')\n    at Helper.truncate (/app/src/classes/helper.js:139:23)\n    at Project.embed (/app/src/classes/project.js:153:37)\n    at Project.command_view (/app/src/classes/project.js:345:31)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.execute (/app/src/commands/writing/project.js:266:20)\n    at async Client.<anonymous> (/app/src/bot.js:59:9)"}
[2023-01-20 21:12:41][ERROR] Error running command: project

[Command/Utils] Help

Implement the help command.

I'm thinking this should just link to the wiki, rather than duplicating information that then needs updating in 2 places.

[Backend] CI Tools

Investigate if I can move from Buddy to Github Actions to build and deploy.

Daily goal XP being granted multiple times

hello, Writer bot keep giving me daily goal xp for 3 sprints in a row whenever I hit my daily goal in the sprints

first sprint
https://cdn.discordapp.com/attachments/727089984661618751/1067489796966060072/image.png
second sprint:
https://cdn.discordapp.com/attachments/727089984661618751/1067489940176375913/image.png
third sprint:
https://cdn.discordapp.com/attachments/727089984661618751/1067490122599239790/image.png

sprint not honouring sprint delay setting

my sprinters also noticed the bot isnt recognizing the fact the server settings show sprint delay is set for 10 minutes, but when a sprint ends it only gives them 2 minutes to input their wordcounts.

Writer Bot Missing Commands

Hello,

Writer bot went offline for a bit yesterday and has been buggy since. One person started a sprint and the time period was set for 15 minutes, but more than 15 minutes passed and writer-bot didn't stop the sprint. When pinged about the current sprint, writer bot claimed there was no sprint in effect.

No one else used it at that point and roughly 10 hours later, writer bot announced the end of the sprint and pinged the user for their word count update.

Today, a sprint was started, but when the user tried to join it with a wordcount, the option to join with a wordcount was no longer listed.

How do we fix this?

Thank you

[Command/Utils] Mysetting

Implement the mysetting command, to allow users to alter their own settings, such as:

  • Timezone
  • Max WPM

[Command/Writing] Goal

Implement the goal command, allowing users to set daily, weekly, monthly, yearly goals, and check them. Plus update towards their goal when they write things in any of the other commands.

project list with status leads to error

{"options":[{"name":"list","type":1,"options":[{"name":"status","type":3,"value":"progress"}]}],"uuid":"e6c74167-20de-473a-88f6-4def401a8416"}
[2023-01-18 19:11:33][ERROR] Error running command: project
{"uuid":"e6c74167-20de-473a-88f6-4def401a8416","stack":"TypeError [CommandInteractionOptionType]: Option \"status\" is of type: 3; expected 5.\n    at CommandInteractionOptionResolver._getTypedOption (/app/node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js:99:13)\n    at CommandInteractionOptionResolver.getBoolean (/app/node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js:137:25)\n    at Object.execute (/app/src/commands/writing/project.js:265:48)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Client.<anonymous> (/app/src/bot.js:59:9)"}

[Command/Writing] Project

Implement the project command, to let users add/edit/delete projects, as well as the options to add to project word counts with other commands, such as wrote and sprint

[Backend] Logging

Implement a logging system, to log commands which are run, who ran it, which server it was in, plus any errors.

[Backend] General

  • Investigate how to make docker containers restart if they crash.
  • Investigate if discord js clusters will restart on failure

[Backend] Cron tasks

Implement scheduled tasks on a cron, to do things like send sprint messages, goal resets, etc...

Info stats wrong?

Active sprints is always around the same number and is way too high. Must be wrong.

Also change all long numbers to localestings.

Error running sprint wc

[2023-01-20 04:56:53][INFO] user 343564229669945356 called sprint in server 1055897168889774200
{"options":[{"name":"wc","type":1,"options":[{"name":"amount","type":4,"value":5517}]}],"uuid":"ecbcc59f-d170-4593-bb3f-053883f9561a"}
{"uuid":"ecbcc59f-d170-4593-bb3f-053883f9561a","stack":"TypeError: Cannot create property 'current_wc' on boolean 'false'\n    at Sprint.updateUser (/app/src/classes/sprint.js:554:31)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Sprint.setUserWordCount (/app/src/classes/sprint.js:624:13)\n    at async Object.execute (/app/src/commands/writing/sprint.js:203:20)\n    at async Client.<anonymous> (/app/src/bot.js:59:9)"}

Looks like sprint_user record is somehow missing or empty?

[Command/Utils] Export

A command to let the user export all their data from writer bot, in the following formats:

  • text
  • json
  • sql (maybe)

This will be for mostly when users want to migrate their data into their own instance of writer-bot.

[Command/Utils] Reset

Implement the reset command to allow the user to reset certain aspects of their profile data.

[Command/Utils] Setting

Implement the server setting command, to allow server owners/mods to:

  • Enable/Disable certain commands
  • Set the sprint delay setting

Refactor DB connection code

  • Remove db connection from bot.js
  • Only connect to database within commands which need it, and then close connection when finished
  • Make sure on error we still close connections

DB cleanup script

Write a script to clean up some old data in the database we don't need any more, for example old sprint_users records.

Also explore if there's a way to reduce the size of the goals history table, as it is by far the largest.

SQL error running sprint status

[2023-01-20 06:54:58][INFO] user 765126981872123916 called sprint in server 1035641333089574973
{"options":[{"name":"status","type":1,"options":[]}],"uuid":"fed3a706-6071-4f39-be49-c034a828743e"}
{"uuid":"fed3a706-6071-4f39-be49-c034a828743e","stack":"SqlError: Parameter at position 1 is undefined\nSELECT * FROM projects WHERE id = ? - parameters:[undefined]\nsql: SELECT * FROM projects WHERE id = ? - parameters:[undefined]\n    at module.exports.createError (/app/node_modules/mariadb/lib/misc/errors.js:57:10)\n    at Query.throwUnexpectedError (/app/node_modules/mariadb/lib/cmd/command.js:40:24)\n    at Query.throwNewError (/app/node_modules/mariadb/lib/cmd/command.js:70:22)\n    at Query.validateParameters (/app/node_modules/mariadb/lib/cmd/query.js:176:14)\n    at Query.start (/app/node_modules/mariadb/lib/cmd/query.js:54:17)\n    at Connection.addCommandEnablePipeline (/app/node_modules/mariadb/lib/connection.js:1055:11)\n    at Connection.query (/app/node_modules/mariadb/lib/connection.js:1289:10)\n    at new Promise (<anonymous>)\n    at ConnectionPromise.query (/app/node_modules/mariadb/lib/connection-promise.js:87:12)\n    at DB._build_get (/app/src/classes/database.js:71:38)"}

Looks like its assuming a project exists for the sprint_user where there isn't one.

Check sprint points

  • non-wc sprinters should all get same points, apparently not happening atm

"it's the same if there's only non-wc sprinters"

[Docs] Wiki

Create wiki in this project and update with correct information.

Look into issues with pool connections being unavailable

Seems that on any kind of error the connection doesn't get ended properly.

Also need to look into re-doing how the db connections are done, so as not to open on every command, only open when needed. But split that into another issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.