Coder Social home page Coder Social logo

cobalt-network-rewrite's Introduction

JuanPablo2655

Just a guy learning how to code and be more productive while working.

Fun Facts

  • I started to program because I thought Discord bots were cool
  • I am a current student in a university studying for my computer science degree

cobalt-network-rewrite's People

Contributors

dependabot[bot] avatar juanpablo2655 avatar snyk-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

cobalt-network-rewrite's Issues

blacklisted words

Please describe the problem you are having in as much detail as possible:
If the message event catches a message with the command and the blacklisted word, it will catch it.
What is expected to happen for the message event is to catch the blacklisted word regardless if the message has the prefix or not.

Include a reproducible action (command, or trigger) sample or code here, if possible:

  cn!blw test // test being the blacklisted word

documentation

Is your feature request related to a problem? Please describe.
I never really built a habit of documenting my code, and it's getting annoying to code without proper documentation.

Describe the ideal solution
Simply document lib/*.

migrate to vitest

Is your feature request related to a problem? Please describe.
Migrate to vitest because it is faster than Jest and comes with TS support out of the box.
https://vitest.dev/

Describe the ideal solution
Having the tests complete faster than it is currently.

Additional context
Add any other context or screenshots about the feature request here.

companions

Is your feature request related to a problem? Please describe.
I've been trying to figure out the best stats for companions. So far I have this:

export interface RaceData {
	race: RaceOptions;
	description: string;
	health: number;
	magicka: number;
	defense: number;
	attack: number;
}

Describe the ideal solution
probably refactor raceData I don't know.

metrics

Is your feature request related to a problem? Please describe.
I think it would be great to collect user data such as how much a command has been run or the most common prefix or the guilds that have used the bot at least once or what items are most or least bought (#2). Having this information would be beneficial for balancing items and understanding the users to improve their experience.

Describe the ideal solution
store in the DB user, guild, and economy data. There is probably more that needs to be stored.

Localization

Is your feature request related to a problem? Please describe.
Something I've been thinking about lately is allowing users who speak other languages to use the bot in their language.

Describe the ideal solution
https://crowdin.com/

Additional context
Add any other context or screenshots about the feature request here.

balancing

Is your feature request related to a problem? Please describe.
When I merged #4 into the master branch I said that I wouldn't worry about balancing all the items yet, this could be solved in a new pull request.

Describe the ideal solution
Once all of the RPG elements are in place (ex: quests, events, classes, and etc) then we can start to work balancing everything. Until then, we have to finish everything else.

Additional context
Add any other context or screenshots about the feature request here.

testing

Is your feature request related to a problem? Please describe.
I think it's a good idea to have a way to test the code to increase code stability and make sure we don't deploy buggy code cough v1 cough.

Describe the ideal solution
Write up a test suite to test code and make sure that it passes for production use.

Additional context
https://jestjs.io/

cache (Redis)

Is your feature request related to a problem? Please describe.
The problem right now is that the bot is sending requests to the database for data and that takes up unnecessary system resources if there a caching system in place.

Describe the ideal solution
To fix the response time and improve the code base performance, it would be beneficial to add a caching system to the code base to reduce latency between the discord command firing and response of the bot.

Additional context
https://www.npmjs.com/package/redis
https://www.npmjs.com/package/@types/redis

items

Is your feature request related to a problem? Please describe.
I've been having trouble lately trying to figure out how to implement items in the discord bot. I had the idea to create an interface like this one:

export interface ItemData {
	id: string;
	name: string;
	category: ItemCategories;
	description: string;
	craftable: boolean;
	canUse: boolean;
	canBuy: boolean;
	price: number;
	sellAmount: number;
	keep: boolean;
	run?: (message: Message, args: string[]) => unknown | Promise<unknown>;
}

but I soon realized that it's not the best way to create attributes for items because I'm neglecting weapons, armor, food, and more of their own attributes.

Describe the ideal solution
Create a system where all the items can have their own proper attributes like weapons:

export interface WeaponData extends ItemData {
	id: string;
	name: string;
	category: ItemCategories;
	description: string;
	canBuy: boolean;
	damage: number;
}

database

Is your feature request related to a problem? Please describe.
It's time to consider using a different database such as PostgresSQL. Although MongoDB is a great DB, it lacks relational row style, which SQL DBs do have. Another potential issue is scalability; NoSQL DBs can scale horizontally (more servers) while SQL DBs can scale vertically (more RAM). This might be an issue in the future if thousands of concurrent users are using the bot.

Describe the ideal solution
Look carefully into NoSQL and SQL DB options

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.