Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

The Grand Pull Request #32

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Tinan Contributing Guide

## Prerequisites

If you want to contribute to this repository, you need basic knowledge of JavaScript and discord.js.

The bot is getting rewritten in TypeScript, so it's also strongly recommended for you to understand TypeScript.

For code convention:

- 2 space indent, no tab.

- const by default and let for reassignable.

- Use SCREAMING_SNAKE_CASE naming for const and camelCase naming for let and var.

## Forking

Step 1: Make a contribution fork of this repository.

## Setting up a Discord bot

Step 2: Go to the [Discord Developer Portal](https://discord.com/developers/applications) and log in with your account.

Step 3: Click on the "New Application" button near your profile picture on the upper right side of your screen and create a new application. Name it anything you want.

Step 4: Click on the "Bot" button on the left side of your screen and create a new bot.

### Step 5. Invite your bot to your server.

Step 5.1: Click on "OAuth2", afterward "URL Generator". Select `bot` and `applications.commands`.

Step 5.2: Select "Administrator" in the list of bot permissions.

Step 5.3: Copy the link at the bottom of the page and paste it into your search bar. Select the server where you want your bot to be in the dropdown list.

Step 6: Reset your bot's token and copy it. It will be used later.

## Making it work

# **Step 7: .env magic (huge for devs to not add it into the repo)**

## **Step 7.1: Inside the *`src`* folder, make a *`.env`* file.**

## **Step 7.2: Type *`DISCORD_TOKEN='your bot token'`***

## Step 8: Creating config.json

Step 8.1: Set the prefix you want. (for example: t!)

Step 9: In your terminal, run `npm install`. It will install all the modules needed to run the bot.

Step 10: Run `cd src` and afterward `node .` to launch the bot.

## Optional config.json stuff

Step 1: Create a channel (or channels) in your server and name it/them anything you want.

If you haven't enabled Developer Mode, you can do so by going into Settings > Advanced > Developer Mode.

Step 2: Copy your channel's ID by right clicking on it and selecting `Copy ID`.

Step 3: Paste the channel's ID into your config.json file.

## How to make commands

If you want to make commands for the bot, you can look at the example commands in the `examples` folder.

## Pull requests

Remember to put a short and concise list of changes to make the review process easier, and all PRs should get reviewed by peer before merging.

# ***PLEASE SUBMIT A PR, NO DIRECT COMMITS!***
![image](https://user-images.githubusercontent.com/51555391/176925763-cdfd57ba-ae1e-4bf3-85e9-b3ebd30b1d59.png)
39 changes: 11 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,24 @@
# Important: we are migrating to a new Discord server [.gg/avdanos](https://discord.gg/avdanos)
# Important: we are migrating to a new [Discord server.](https://discord.gg/avdanos)

# Notice: Pull Requests on this repository won't be reviewed often due to the main focus being the Desktop Environment.

# Tinan
The Discord Bot for the AvdanOS Community Discord server, made using discord.js v13.8.
# How to contribute
## Forking
Step 1: Make a contribution fork of this repository.
## Setting up a Discord bot
Step 2: Go to the [Discord Developer Portal](https://discord.com/developers/applications) and log in with your account.

Step 3: Click on the "New Application" button near your profile picture on the upper right side of your screen and create a new application. Name it anything you want.
The Discord bot for the [AvdanOS Community Discord server](https://discord.gg/avdanos), built with discord.js v14.0.2.

Step 4: Click on the "Bot" button on the left side of your screen and create a new bot.
<div align="center">

### Step 5. Invite your bot to your server.
Step 5.1: Click on "OAuth2", afterward "URL Generator". Select `bot` and `applications.commands`.
![Banner](https://raw.githubusercontent.com/Avdan-OS/.github/main/banner/Tinan.png)

Step 5.2: Select "Administrator" in the list of bot permissions.
![yes](https://img.shields.io/badge/Node-%3E%3D16.9-informational)
![yes1](https://img.shields.io/badge/Notice-NO%20COMMIT%2C%20PR%20ONLY-critical)

Step 5.3: Copy the link at the bottom of the page and paste it into your search bar. Select the server where you want your bot to be in the dropdown list.
</div>

Step 6: Reset your bot's token and copy it. It will be used later.
## Making it work
Step 7: Inside the `src` folder, make a `.env` file, and type `DISCORD_TOKEN=your token` and `PREFIX=your prefix`
# Current state

### Step 8. Get your Discord server ID
Step 8.1: Enable developer mode by going into Settings (near your profile picture at the bottom) > Advanced > Developer Mode.
Currently, we are rewriting the bot to TypeScript.

Step 8.2: Copy your server ID by right clicking the server icon and clicking "Copy ID".
# Contributing

Step 9: Inside the src > commands folder, open `cmdHandler.js` and in the 57th line, replace the number in a string with your ID.

Step 10: In your terminal, run `npm install`. It will install all the modules needed to run the bot.

Step 11: Run `cd src` and afterward `node .` to launch the bot.
## How to make commands
Step 12: In the commands folder, there are 2 `example.js` files. You can use them as a reference to build new commands.
## Pull requests
Step 13: Remember to put a short and concise list of changes to make the review process easier.
See `CONTRIBUTING.md` for contributing guidelines.
1 change: 0 additions & 1 deletion example.env

This file was deleted.

Loading