Giter Club home page Giter Club logo

client's Introduction

Would You Banner

WebsiteSupportInviteVoteToSPrivacy


Would You is a popular Discord bot that allows you to play the classic game of Would You Rather with your friends!


Getting Started

Starting the Development Environment

The development environment does not currently use Docker, so you will need to install the dependencies manually.

  1. Install Node.js (version 17.9.x or higher) and pnpm.
  2. Install all dependencies by running pnpm install in the root directory.
  3. Create a .env file in the root directory, copy the contents of .env.example into .env, and then fill in the values with your values.
  4. Run pnpm run test to start the development environment. This will run all of the applications in development mode.

Formatting

Before committing, make sure to run pnpm format to format the code. This will also be run automatically when you commit, but it is better to run it manually to make sure you don't commit code that isn't formatted correctly.

Additionally, it is recommended to install the Prettier extension for VS Code. This will automatically format the code when you save (or based on the event you choose).

Committing

Follow the Angular commit message format. See here for more information.

NPM Scripts

You can run the below scripts with pnpm <script>.

Script Description
start Runs the code in production mode
dev Runs the code using nodemon in dev mode
format Formats the code.

Discord logs

Logs are also sent to Discord to allow for easier and more accessible debugging, as not everyone will have access to the host system, especially in production. The channels for the different log levels are defined in the .env file.

Docker deployment

For a guide regarding the deployment on our production server go to this link

Project Details

Contributing

If you would like to contribute to the project, please read the contributing guidelines. If you have any questions, feel free to ask in the support server.

License

This project is licensed under the MIT License.

client's People

Contributors

axorax avatar codercoool avatar danplayz0 avatar deepsource-io[bot] avatar dependabot[bot] avatar fb-sean avatar forgetfulskybro avatar github-actions[bot] avatar gxrsti avatar himanshu-malviya15 avatar marta23silva avatar melonfyi avatar mezotv avatar mysticman8 avatar nidrux avatar originalcpp avatar renovate[bot] avatar rustytrim avatar sldless avatar slekup avatar vachanmn123 avatar yareaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

client's Issues

DiscordAPIError[40060]: Interaction has already been acknowledged.

Title: DiscordAPIError[40060]: Interaction has already been acknowledged.

Description:
Interaction has already been acknowledged.

DiscordAPIError[40060]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 11

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/99/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

DiscordAPIError[50013]: Missing Permissions

Title: DiscordAPIError[50013]: Missing Permissions

Description:
Missing Permissions

DiscordAPIError[50013]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 28

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/111/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

DiscordAPIError[50001]: Missing Access

Title: DiscordAPIError[50001]: Missing Access

Description:
Missing Access

DiscordAPIError[50001]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 2763

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/106/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

Cooldown bug - buttons are not interactable, Inaccurate time.

When pressing on a button to generate a new question. it will generate new question but if you have a cooldown. you can't interact with the buttons (not talking about new question button).

just watch the video if you don't understand or you want to see how to reproduce the bug:
https://streamable.com/6yxv1r

if we already talk about the cooldown issue. cooldown message will show the time 30 seconds from now instead when the time is actually up.

mozo is already aware of those bugs. but if anyone else is willing to fix those issues. have fun :)

ValidationError: higherlowerModel validation failed: items.current.link: Path `items.current.link` is required.

Title: ValidationError: higherlowerModel validation failed: items.current.link: Path items.current.link is required.

Description:
higherlowerModel validation failed: items.current.link: Path items.current.link is required.

ValidationError

/home/wouldyou/bot/node_modules/.pnpm/[email protected]/node_modules/mongoose/lib/document.js

model.Document.invalidate

Count: 3010

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/72/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/[email protected]/node_modules/mongoose/lib/document.js
  • Function: model.Document.invalidate

[Feature] Dynamic Help command

Add a dynamic help command so we don't need to go through the process of doing it manually.
Should support our language system though

DiscordAPIError[10062]: Unknown interaction

Title: DiscordAPIError[10062]: Unknown interaction

Description:
Unknown interaction

DiscordAPIError[10062]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 462

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/15/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

[Feature/Bug] Add duplicate check

Add a function that checks if 2 generated messages are the same and if so generates the second one again so rather.js questions don't end up being the same

DiscordAPIError[10003]: Unknown Channel

Title: DiscordAPIError[10003]: Unknown Channel

Description:
Unknown Channel

DiscordAPIError[10003]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 4741

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/103/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

Channel cooldown - NightKiller_2#3700

There already is a replay cooldown, however there isn’t a channel cooldown. For something like a general chat, it’d be nice to set a slowmode for new questions.

[Fix] Cooldown being displayed wrong

The current remaining cooldown always takes date.now / 1000 as a reply however client.used should include a varibale that has the exact time so we can just display that and get it from cache. This would fix the reply always saying 30 seconds remaining!

Simple fix will test soon!

Test

This is a test.

DiscordAPIError[10062]: Unknown interaction

Title: DiscordAPIError[10062]: Unknown interaction

Description:
Unknown interaction

DiscordAPIError[10062]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 462

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/15/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @discordjs/builders ^0.15.0
  • @discordjs/rest ^0.5.0
  • axios ^0.27.2
  • chalk-advanced ^1.0.3
  • discord-api-types ^0.35.0
  • discord.js ^13.6.0
  • dotenv ^16.0.0
  • dungeon-api ^1.0.1
  • mongoose ^6.3.5
  • topgg-autoposter ^2.0.1
  • ts-node ^10.8.1
  • typescript ^4.7.3
  • nodemon 2.0.18

  • Check this box to trigger a request for Renovate to run again on this repository

[Feature] Add vote role rewards

When the user who votes is on the support server add the voter role to him for 12 hours use con to check if he is still votes usin top.ggs API!

DiscordAPIError[50001]: Missing Access

Title: DiscordAPIError[50001]: Missing Access

Description:
Missing Access

DiscordAPIError[50001]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 133

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/14/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

Error [InteractionCollectorError]: Collector received no interactions before ending with reason: time

Title: Error [InteractionCollectorError]: Collector received no interactions before ending with reason: time

Description:
Collector received no interactions before ending with reason: time

Error [InteractionCollectorError]

/home/wouldyou/bot/node_modules/.pnpm/[email protected]/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js

InteractionCollector.

Count: 32

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/21/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/[email protected]/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js
  • Function: InteractionCollector.

Fix error?.message?.includes

Remove:

if (err && (err?.code === 10015 || `${err?.message}`?.inlcudes('Unknown Webhook')) && channel?.permissionsFor(this.c?.user?.id).has([PermissionFlagsBits.ManageWebhooks])) {

Add:

if (err && (err?.code === 10015 || err?.message?.inlcudes('Unknown Webhook')) && channel?.permissionsFor(this.c?.user?.id).has([PermissionFlagsBits.ManageWebhooks])) {

Fix made by fb_sean

Add Issue and PR template

Add an issue and pr template so contributors are required to follow a predefined style for their pull requests and issues.

MongoServerError: E11000 duplicate key error collection: wouldyou.usermodels index: userID_1 dup key: { userID: null }

Title: MongoServerError: E11000 duplicate key error collection: wouldyou.usermodels index: userID_1 dup key: { userID: null }

Description:
E11000 duplicate key error collection: wouldyou.usermodels index: userID_1 dup key: { userID: null }

MongoServerError

/home/wouldyou/bot/node_modules/.pnpm/[email protected]/node_modules/mongodb/lib/operations/insert.js

Count: 380

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/73/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/[email protected]/node_modules/mongodb/lib/operations/insert.js
  • Function:

DiscordAPIError[50001]: Missing Access

Title: DiscordAPIError[50001]: Missing Access

Description:
Missing Access

DiscordAPIError[50001]

/home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js

handleErrors

Count: 27

Permalink: https://sentry.wouldyoubot.gg/organizations/dominik-development/issues/108/

Stacktrace:

  • Filename: /home/wouldyou/bot/node_modules/.pnpm/@discordjs[email protected]/node_modules/@discordjs/rest/dist/index.js
  • Function: handleErrors

Mezo#0001's Request

add customizable slowmode duration. 20 seconds might not be enough so a longer duration would be cool to set.

Feature idea

Set channel for random would you message to be sent at random intervals between every x and y messages

Channel cooldown - NightKiller_2#3700

There already is a replay cooldown, however there isn’t a channel cooldown. For something like a general chat, it’d be nice to set a slowmode for new questions.

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.