Giter VIP home page Giter VIP logo

daruma-games's Introduction

Algodaruma DiscordJS Bot

Welcome to the Algodaruma DiscordJS Bot repository. This project was initially developed as a private repository and has now been made public for the benefit of the wider developer community.

Overview

The Algodaruma DiscordJS Bot is a comprehensive bot designed to enhance the user experience on Discord servers. It was initially developed for private use within the Algodaruma community, providing a range of features to engage and assist users.

User Wiki

https://shoginn.gitbook.io/daruma-games

Features

The bot includes a variety of features, such as:

  • Karma System: The bot integrates with the KarmaCommandService, allowing users to add and manage Karma points. See KarmaCommandService for more details.
  • Asset Management: The bot can handle various assets, including AlgoNFTAssets. It provides functionalities like displaying asset details, checking cooldowns, and more. See dt-embeds.ts for more details.
  • Interactive Buttons: The bot uses Discord's ButtonBuilder to create interactive buttons for various actions. See embedButton function for more details.

Making it Public

The decision to make this repository public was driven by a desire to share the work done on this bot with the wider community. We believe that by doing so, we can encourage collaboration, learning, and improvement of the bot's features and functionalities.

We welcome contributions and suggestions from all users. Please feel free to fork this repository, submit pull requests, or create issues for any bugs you find or enhancements you suggest.

Getting Started

To Get Started with the Algodaruma DiscordJS Bot,

...to be continued

daruma-games's People

Contributors

shoginn avatar github-actions[bot] avatar renovate[bot] avatar dependabot[bot] avatar

Watchers

Lucian avatar  avatar

daruma-games's Issues

Available to train all

<@827317035670700042> <@385709374422777856> just thought about a small QOL upgrade. wondering if it would be possible to add "You have xx amount of assets (darumas) available to train" after "darumaname has entered the game"

Similar to how tinyhorse does it

Let's you know how many darumas you have left without manually checking ☺️

Random winner(s) by date

Create a command that allows you to pick a date and for that entire date utc quad z to utc quad z. It will get all winners in encounters and pick a random winner.

With that same command allow multiple random assets no repeats.

When the assets are randomly chosen display them not ephemeral. And show the wallet that owned them that day as well as the user associated with that wallet.

Time based leader boards

Rather than have the top dojo ranking for all time, offer a time-based option:

day/week/month

Dependency Dashboard

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

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
.devcontainer/docker-compose.yml
addons/db-backup/docker-compose.yml
addons/rclone/docker-compose.yml
dockerfile
.devcontainer/Dockerfile
Dockerfile
github-actions
.github/actions/setup-node-pnpm/action.yaml
  • pnpm/action-setup v4
  • actions/setup-node v4
.github/workflows/ci.yml
  • actions/checkout v4
  • wagoid/commitlint-github-action v6.0.1
  • actions/checkout v4
  • actions/checkout v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/download-artifact v4
  • codecov/codecov-action v4
  • geekyeggo/delete-artifact v5
  • googleapis/release-please-action v4
.github/workflows/e2e.yml
  • actions/checkout v4
  • actions/setup-python v5
npm
package.json
  • @algorandfoundation/algokit-utils ^6.1.2
  • @discordx/importer ~1.3.1
  • @discordx/pagination ~3.5.4
  • @discordx/utilities ^7.0.1
  • @faker-js/faker ^8.4.1
  • algosdk ^2.8.0
  • axios ^1.7.2
  • bottleneck ^2.19.5
  • convict ^6.2.4
  • convict-format-with-validator ^6.2.0
  • cron-parser ^4.9.0
  • cron-validator ^1.3.1
  • dayjs ^1.11.12
  • discord.js ~14.15.3
  • discordx ~11.12.0
  • dotenv ^16.4.5
  • handlebars ^4.7.8
  • http-status-codes ^2.3.0
  • immer ^10.1.1
  • lodash ^4.17.21
  • memoizer-ts ^1.0.1
  • mongoose ^8.5.1
  • node-cache ^5.1.2
  • node-schedule ^2.1.1
  • random-js ^2.1.0
  • reflect-metadata ~0.2.2
  • toad-scheduler ^3.0.1
  • tslib ^2.6.3
  • tsyringe ~4.8.0
  • winston ^3.13.1
  • winston-transport ^4.7.1
  • @commitlint/cli ^19.3.0
  • @commitlint/config-conventional ^19.2.2
  • @eslint/js ^9.7.0
  • @jest/globals ^29.7.0
  • @jest/types ^29.6.3
  • @shoginn/discordjs-mock ^1.0.7
  • @trivago/prettier-plugin-sort-imports ^4.3.0
  • @tsconfig/strictest ^2.0.5
  • @types/convict ^6.1.6
  • @types/convict-format-with-validator ^6.0.5
  • @types/eslint-config-prettier ^6.11.3
  • @types/eslint__js ^8.42.3
  • @types/jest ^29.5.12
  • @types/lodash ^4.17.7
  • @types/mitm ^1.3.8
  • @types/node ^20.14.12
  • @types/node-schedule ^2.1.7
  • @typescript-eslint/eslint-plugin ^7.17.0
  • @typescript-eslint/parser ^7.17.0
  • eslint ^8.57.0
  • eslint-config-prettier ~9.1.0
  • eslint-plugin-deprecation ^3.0.0
  • eslint-plugin-import ^2.29.1
  • eslint-plugin-jest ^28.6.0
  • eslint-plugin-prettier ^5.2.1
  • eslint-plugin-simple-import-sort ^12.1.1
  • eslint-plugin-unicorn ^55.0.0
  • genversion ^3.2.0
  • husky ^9.1.1
  • is-ci ^3.0.1
  • jest ^29.7.0
  • jest-fetch-mock ^3.0.3
  • mitm ^1.7.2
  • mongodb-memory-server ^10.0.0
  • prettier ^3.3.3
  • rimraf ^6.0.1
  • ts-jest ^29.2.3
  • ts-jest-resolver ^2.0.1
  • ts-mockito ^2.6.1
  • ts-node ^10.9.2
  • typescript ^5.5.4
  • typescript-eslint ^7.17.0
  • node >=20
  • pnpm >=9

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

Add Potions to the game

Add the ability to add potions that reduce cooldowns or increase Karma payouts.

Maybe have a BUFF version that extends from now until its expire time

And an INSTANT that will modify current setup;

Game setup features

  • Have the ability to reserve wallets so they are not able to be used.
  • Also add the ability to add specific assets in addition to wallets to the game.

Attempt to solve gateway errors

daruma-games | ⚡ 2023-08-24T21:16:46.688Z [error] : Error in gameHandler: {"requestBody":{"files":[],"json":{"content":">>>                **ROUND**                \n       :one:        \t       :two:        \n~~                    \t                    ~~\n<:Rm:1045719428945412136> <:Rm:1045719428945412136> <:Rm:1045719428945412136>\t<:Ct:1045719541377945660> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 3**       \t       ** 6**       \n~~                    \t                    ~~\n<:HB:1045719500781277205> <:HB:1045719500781277205> <:HB:1045719500781277205>\t<a:roll:1045719404727521281> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 6**       \t                    \n~~                    \t                    ~~\n<:HB:1045719500781277205> <:Ct:1045719541377945660> <:HB:1045719500781277205>\t<:PH:1045719354483933264> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 7**       \t                    \n~~                    \t                    ~~\n<:HB:1045719500781277205> <:Rm:1045719428945412136> <:Ct:1045719541377945660>\t<:PH:1045719354483933264> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 6**       \t                    \n~~                    \t                    ~~\n<:HB:1045719500781277205> <:HB:1045719500781277205> <:Rm:1045719428945412136>\t<:PH:1045719354483933264> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 5**       \t                    \n~~                    \t                    ~~","tts":false,"flags":0}},"name":"HTTPError","status":502,"method":"PATCH","url":"https://discord.com/api/v10/channels/1079922360339136512/messages/1144379603436187738"}
daruma-games | ⚡ 2023-08-24T21:16:47.056Z [error] : Error in gameHandler: {"requestBody":{"files":[],"json":{"content":">>>                **ROUND**                \n       :one:        \t       :two:        \n~~                    \t                    ~~\n<:Ct:1045719541377945660> <:Rm:1045719428945412136> <:Rm:1045719428945412136>\t<:HB:1045719500781277205> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 5**       \t       ** 7**       \n~~                    \t                    ~~\n<:Rm:1045719428945412136> <:HB:1045719500781277205> <:HB:1045719500781277205>\t<:Rm:1045719428945412136> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 5**       \t       ** 6**       \n~~                    \t                    ~~\n<:Ct:1045719541377945660> <:Rm:1045719428945412136> <:HB:1045719500781277205>\t<:Rm:1045719428945412136> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 6**       \t       ** 7**       \n~~                    \t                    ~~\n<:HB:1045719500781277205> <:Ct:1045719541377945660> <:HB:1045719500781277205>\t<:HB:1045719500781277205> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 7**       \t       ** 9**       \n~~                    \t                    ~~\n<:Rm:1045719428945412136> <:Rm:1045719428945412136> <:Rm:1045719428945412136>\t<:Rm:1045719428945412136> <:PH:1045719354483933264> <:PH:1045719354483933264>\n       ** 3**       \t       ** 4**       \n~~                    \t                    ~~","tts":false,"flags":0}},"name":"HTTPError","status":502,"method":"PATCH","url":"https://discord.com/api/v10/channels/1042495147964899328/messages/1144379576491970670"}
daruma-games | ⚡ 2023-08-24T21:16:47.071Z [error] : Bad Gateway
daruma-games | ⚡ 2023-08-24T21:16:47.073Z [error] : HTTPError: Bad Gateway
daruma-games |     at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:680:11)
daruma-games |     at SequentialHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:1072:29)
daruma-games |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
daruma-games |     at async SequentialHandler.queueRequest (/app/node_modules/@discordjs/rest/dist/index.js:913:14)
daruma-games |     at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1218:22)
daruma-games |     at async TextChannel.send (/app/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:162:15)
daruma-games |     at async Game.execWin (file:///app/build/esm/utils/classes/dt-game.js:368:9)
daruma-games |     at async Game.startChannelGame (file:///app/build/esm/utils/classes/dt-game.js:206:9)
daruma-games |     at async Game.updateEmbed (file:///app/build/esm/utils/classes/dt-game.js:304:13)
daruma-games |     at async registerPlayer (file:///app/build/esm/utils/functions/dt-embeds.js:641:5)
daruma-games | ⚡ 2023-08-24T21:16:47.440Z [error] : undefined {"requestBody":{"files":[],"json":{"content":"Something went wrong, please notify my developer: <@385709374422777856>","tts":false}},"name":"HTTPError","status":502,"method":"POST","url":"https://discord.com/api/v10/webhooks/1038454862976909413/aW50ZXJhY3Rpb246MTE0NDM3OTU5NzEyNzk0MjI5Njp4aW9majBMN0l2NGVRUllWQ05HS1hzOXJyWVRvOTRHUUpqS09pWlc2eXBKMUpqTDVEYWNYZDcyNmFXM2lkanlFWU9jNGRhQlo4N3c4SUVYWXpwSlFmTk9Yd0VMbW8waUdJZnQ3Rlp4MElNMHlhNWl5bXk1SWtPdmt5b2lCS3NZSg?wait=true"}
daruma-games | ⚡ 2023-08-24T21:16:47.443Z [error] : Bad Gateway
daruma-games | ⚡ 2023-08-24T21:16:47.443Z [error] : HTTPError: Bad Gateway
daruma-games |     at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:680:11)
daruma-games |     at SequentialHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:1072:29)
daruma-games |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
daruma-games |     at async SequentialHandler.queueRequest (/app/node_modules/@discordjs/rest/dist/index.js:913:14)
daruma-games |     at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1218:22)
daruma-games |     at async TextChannel.send (/app/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:162:15)
daruma-games |     at async Game.execWin (file:///app/build/esm/utils/classes/dt-game.js:368:9)
daruma-games |     at async Game.startChannelGame (file:///app/build/esm/utils/classes/dt-game.js:206:9)
daruma-games |     at async Game.updateEmbed (file:///app/build/esm/utils/classes/dt-game.js:304:13)
daruma-games |     at async registerPlayer (file:///app/build/esm/utils/functions/dt-embeds.js:641:5)
daruma-games | ⚡ 2023-08-24T21:16:47.830Z [error] : undefined {"requestBody":{"files":[],"json":{"content":"Something went wrong, please notify my developer: <@385709374422777856>","tts":false}},"name":"HTTPError","status":502,"method":"POST","url":"https://discord.com/api/v10/webhooks/1038454862976909413/aW50ZXJhY3Rpb246MTE0NDM3OTU2OTM0OTA4MzI1NzptMUI5S0Q2RlhsemlFNjhpMFZ4UFVpdm9jYk9NQjYxbVBtc1JZM1dhaFpaWDI1b1lNM0d1TkhzODVVNk9WSHFXRlFYcUZteVlWNHpVUTlOVUxRTk5uVEFGbDltQ3lrTHpWZWVWaFpDbDhDcWJBSDNnenFkdmJpTDdRck1JNFhhUA?wait=true"}
daruma-games | ⚡ 2023-08-24T21:48:51.459Z [info] : Maintenance mode enabled
daruma-games | ⚡ 2023-08-24T21:49:43.007Z [info] : Maintenance mode disabled

Elixir Salesman -- Updates? Should He?

Right now, the salesman pulls from assets without any discernment of their cooldowns...

Should he only reset cooldowns that are long? Or should it be completely random?

Add random cooldown modifiers

Enable a modifier to either extend or decrease cooldowns.

These algorithm is determined by daruma total games and owner total daruma.

The less games a daruma had played in the greater the chances to lower cooldown.

Shady Daruma Gif's

Soon as Leo is done with the shady gifs; add them to the bot when the shady button pops!

Wallet Gui Enhancements

Add a button for Opting into KARMA if someone tries to tip (a button that links to wallet)

Also when you are in the wallet and you are not opted in on a certain wallet add a button that links to opt-in link

Asset Owner / Asset Update Logging Updates

The logs are vague and require updating:

⚡ 2023-12-09T00:00:00.470Z [info] : Found 1019 created-assets for account PJZZK5XLDUGMNBKQIEGFERO6TLSB4M3ZC6G32WPOLDIOCPUTVUMH4S52GE 
⚡ 2023-12-09T00:00:01.330Z [info] : Found 9 created-assets for account 5EQXO5KQLKBET3G5CRA3SU3FBA5EUV5ZXYQ4V2LHLU4RUCKUP7AYBIOMME 
⚡ 2023-12-09T10:08:23.526Z [info] : No asset owner updates required. 
⚡ 2023-12-09T16:08:23.551Z [info] : No asset owner updates required. 
⚡ 2023-12-09T22:08:23.393Z [info] : No asset owner updates required. 
⚡ 2023-12-10T00:00:00.526Z [info] : Found 1019 created-assets for account PJZZK5XLDUGMNBKQIEGFERO6TLSB4M3ZC6G32WPOLDIOCPUTVUMH4S52GE 
⚡ 2023-12-10T00:00:01.503Z [info] : Found 9 created-assets for account 5EQXO5KQLKBET3G5CRA3SU3FBA5EUV5ZXYQ4V2LHLU4RUCKUP7AYBIOMME 
⚡ 2023-12-10T00:00:44.096Z [info] : No asset owner updates required. 

Asset being held in a wallet they are no longer in

Had a bug where the wallet says it has the assets but the wallet that owns the asset is not in the database.

So when the asset is moved to another wallet the assets never get removed from the existing wallet

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.