Skip to content
This repository was archived by the owner on Mar 8, 2026. It is now read-only.

Latest commit

 

History

History
56 lines (35 loc) · 2.01 KB

File metadata and controls

56 lines (35 loc) · 2.01 KB

Sokora Contributing Guide

Prerequisites

Get started with contributing

Getting the code

  • Make a fork of this repository.
  • Clone your fork.

Creating your bot

  • 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.

Setting up .env

  • Run bun run setup and our CLI tool will install dependencies and write .env for you. It'll ask you to paste in your bot's token.

Running

  • 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.

Contribution guide

A few, simple guidelines onto how to contribute to Sokora.

Reminders

  • Remember to commit changes to bun.lock file.

Code styling guidelines

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&R style for bracket placement (function() {} instead of function() \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 camelCase for 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 if statements.
  • Non-nullish assertions are valid when needed.
  • Use the functions safeChannel and safeMember from safeThings instead of using the cache or fetching.
  • Prefer Promise.all over having several await statements.

PLEASE SUBMIT A PR, NO DIRECT COMMITS