- Basic knowledge of TypeScript and discord.js.
- Bun installed.
- Make a fork of this repository.
- Clone your fork.
- Head over to the Discord Developer Portal and make a new application.
- Invite your bot to your server.
- Reset and then copy your bot's token.
- Run
bun run setupand our CLI tool will install dependencies and write .env for you. It'll ask you to paste in your bot's token.
- Run
bun dev.
Be sure to open a pull request when you're ready to push your changes. Be descriptive of the changes you've made.
A few, simple guidelines onto how to contribute to Sokora.
- Remember to commit changes to
bun.lockfile.
A few guides onto how code contributed to Sokora should look like.
- Keep a consistent indentation of two spaces. Don't use tabs.
- Use
K&Rstyle for bracket placement (function() {}instead offunction() \n {}). - Avoid arrow parenthesis, this means preferring, for example,
.filter(s => s.trim())above.filter((s) => s.trim()). Use parenthesis only if they're necessary, for example when you need to explicitly type a parameter. - Use
camelCasefor both variables and function names. - Keep lines reasonably short, don't fear linebreaks. Of course, longer lines are valid where needed.
- Use early returns to avoid nesting.
- Avoid curly braces in one-line
ifstatements. - Non-nullish assertions are valid when needed.
- Use the functions
safeChannelandsafeMemberfromsafeThingsinstead of using the cache or fetching. - Prefer
Promise.allover having severalawaitstatements.
