1
Fork 0
mirror of https://gitlab.com/Kwoth/nadekobot.git synced 2024-10-02 20:13:13 +00:00

- Deleted credentials.json which because it is replaced by creds.yml

- Updated mkdocs to have a reference to creds-guide and migration-guide
- Updated credentials.json references to say creds.yml and have proper yml formatting
This commit is contained in:
Kwoth 2021-09-04 20:21:32 +02:00
parent 2a8bb18e7c
commit ae081a7697
8 changed files with 71 additions and 112 deletions

View file

@ -1 +1,20 @@
TODO Readme
# NadekoBot
NadekoBot is a general purpose discord bot.
### Useful links
- [Command list](https://nadeko.bot/commands)
- [Self hosting Guides](https://nadekobot.rftd.io)
- [Discord support server](https://discord.nadeko.bot)
### Modules
- Administration (ban, warn, moderation commands)
- Utility (role and config related commands)
- Games (Fun)
- Gambling (Currency related commands)
- Permissions (Filtering and nadekobot's permission system commands)
- CustomReactions (Custom bot responses based on keywords)
- Music
- Help
- Xp (Xp system related commaands)
- Searches (Search for things like definitions, images, etc)

View file

@ -4,7 +4,7 @@
- *Bot Owner Only* commands refer to the commands only the **owner** of the bot can use.
- *Bot Owner Only* commands do **not** refer to the owner of the **server**, just the owner of the **bot**.
- *Owner of the bot* is a person who is **hosting** their own bot, and their **ID** is inside of **credentials.json** file.
- *Owner of the bot* is a person who is **hosting** their own bot, and their **ID** is inside of **creds.yml** file.
- You are **not** the bot **owner** if you invited the bot using **Carbonitex** or other invitation links.
## Music on the public Nadeko

View file

@ -16,6 +16,32 @@ This document aims to guide you through the process of creating a Discord accoun
- Scroll down to the `Privileged Gateway Intents` section and enable both intents.
These are required for a number of features to function properly, and should both be on.
##### Getting Owner ID*(s)*:
- Go to your Discord server and attempt to mention yourself, but put a backslash at the start
*(to make it slightly easier, add the backslash after the mention has been typed)*.
- For example, the message `\@fearnlj01#3535` will appear as `<@145521851676884992>` after you send the message.
- The message will appear as a mention if done correctly. Copy the numbers from it **`145521851676884992`** and replace the big number on the `OwnerIds` section with your user ID.
- Save the `creds.yml` file.
- If done correctly, you should now be the bot owner. You can add multiple owners by adding them below the first one. Indentation matters.
For a single owner, it should look like this:
```yml
OwnerIds:
- 105635576866156544
```
For multiple owners, it should look like this (pay attention to the commas, the last ID should **never** have a comma next to it):
```yml
OwnerIds:
- 105635123466156544
- 145521851676884992
- 341420590009417729
```
#### Inviting your bot to your server
![Invite the bot to your server](https://cdn.nadeko.bot/tutorial/bot-invite-guide.gif)

View file

@ -41,7 +41,7 @@
- If you will use the music module, click on **`Install`** next to **`FFMPEG`** and **`Youtube-DL`**.
- If any dependencies fail to install, you can temporarily disable your Windows Defender/AV until you install them. If you don't want to, then read [the last section of this guide](#Manual-Prerequisite-Installation).
- When installation is finished, click on **`CREDS`** to the left of **`RUN`** at the lower right.
- Follow the guide on how to [Set up the credentials.json](../../jsons-explained) file.
- Follow the guide on how to [Set up the creds.yml](../../creds-guide) file.
#### Starting the bot

View file

@ -1,57 +1,3 @@
## Setting up your Credentials
This document aims to guide you through the process of setting up the credentials necessary for the bot installed on your computer to be able to log into that account.
---
#### Setting up credentials.json file
- **For Windows (Updater)**: the `credentials.json` file is located in the `system` folder. You can access it through the updater by clicking on the `Creds` button.
- **For Windows (Source), Linux and OSX**: the `credentials.json` file is located in the `NadekoBot/src/NadekoBot` folder.
---
##### Getting the Bot's Token:
- On the **Bot** tab of your [applications page][DiscordApp], copy your `Token`.
- *Note: Your bot Token **is not** the Client Secret! We won't need the Client Secret for anything.*
- Paste your bot token **between** the quotation marks on the **`"Token"`** line of your `credentials.json`.
It should look like this:
```json
"Token": "MTc5MzcyXXX2MDI1ODY3MjY0.ChKs4g.I8J_R9XX0t-QY-0PzXXXiN0-7vo",
```
##### Getting Owner ID*(s)*:
- Go to your Discord server and attempt to mention yourself, but put a backslash at the start
*(to make it slightly easier, add the backslash after the mention has been typed)*.
- For example, the message `\@fearnlj01#3535` will appear as `<@145521851676884992>` after you send the message.
- The message will appear as a mention if done correctly. Copy the numbers from it **`145521851676884992`** and replace the big number on the `OwnerIds` section with your user ID.
- Save the `credentials.json` file.
- If done correctly, you should now be the bot owner. You can add multiple owners by seperating each owner ID with a comma within the square brackets.
For a single owner, it should look like this:
```json
"OwnerIds": [
105635576866156544
],
```
For multiple owners, it should look like this (pay attention to the commas, the last ID should **never** have a comma next to it):
```json
"OwnerIds": [
105635123466156544,
145521851676884992,
341420590009417729
],
```
---
## Setting up your API keys
This part is completely optional, **however it's necessary for music and a few other features to work properly**.
@ -61,23 +7,23 @@ This part is completely optional, **however it's necessary for music and a few o
- Follow these steps on how to setup Google API keys:
- Go to [Google Console][Google Console] and log in.
- Create a new project (name does not matter).
- Once the project is created, go into **`Library`**
- Under the **`YouTube APIs`** section, enable `YouTube Data API`
- On the left tab, access **`Credentials`**,
- Once the project is created, go into `Library`
- Under the `YouTube APIs` section, enable `YouTube Data API`
- On the left tab, access `Credentials`,
- Click `Create Credentials` button,
- Click on `API Key`
- A new window will appear with your `Google API key`
*NOTE: You don't really need to click on `RESTRICT KEY`, just click on `CLOSE` when you are done.*
- Copy the key.
- Open up **`credentials.json`** and look for **`"GoogleAPIKey"`**, paste your API key inbetween the quotation marks.
- Open up `creds.yml` and look for `GoogleAPIKey`, paste your API key after the `:`.
- It should look like this:
```json
```yml
"GoogleApiKey": "AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM",
```
- **MashapeKey**
- Required for Hearthstone cards.
- Api key obtained on https://rapidapi.com (register -> go to MyApps -> Add New App -> Enter Name -> Application key)
- Copy the key and paste it into `credentials.json`
- Copy the key and paste it into `creds.yml`
- **OsuApiKey**
- Required for Osu commands
- You can get this key [here](https://osu.ppy.sh/p/api).
@ -95,10 +41,10 @@ This part is completely optional, **however it's necessary for music and a few o
- You can set `http://localhost` as the OAuth Redirect URL (and press Add button)
- Select `Chat Bot` from the Category dropdown
- Once created, clicking on your application will show a new Client ID field
- Copy it to your credentials.json as shown below
- *(if you're adding it as the last key inside your credentials.json, remove the trailling comma from the example below)*
```json
"TwitchClientId": "516tr61tr1qweqwe86trg3g",
- Copy it to your creds.yml as shown below
- *(if you're adding it as the last key inside your creds.yml, remove the trailling comma from the example below)*
```yml
TwitchClientId: "516tr61tr1qweqwe86trg3g",
```
- **LocationIqApiKey**
- Optional. Used only for the `.time` command. https://locationiq.com api key (register and you will receive the token in the email).
@ -119,17 +65,16 @@ This part is completely optional, **however it's necessary for music and a few o
- Required if you want to be able to use the `.restart` command
- If you're using the CLI installer or Linux/OSX, it's easier and more reliable setup Nadeko with auto-restart and just use `.die`
For Windows (Updater), add this to your `credentials.json`
For Windows (Updater), add this to your `creds.yml`
```json
"RestartCommand": {
"Cmd": "NadekoBot.exe"
},
```yml
RestartCommand:
Cmd: "NadekoBot.exe"
```
For Windows (Source), Linux or OSX, add this to your `credentials.json`
For Windows (Source), Linux or OSX, add this to your `creds.yml`
```json
```yml
"RestartCommand": {
"Cmd": "dotnet",
"Args": "run -c Release"
@ -140,9 +85,9 @@ For Windows (Source), Linux or OSX, add this to your `credentials.json`
#### End Result
**This is an example of how the `credentials.json` looks like with multiple owners, the restart command (optional) and all the API keys (also optional):**
**This is an example of how the `creds.yml` looks like with multiple owners, the restart command (optional) and all the API keys (also optional):**
```json
```yml
{
"Token": "MTc5MzcyXXX2MDI1ODY3MjY0.ChKs4g.I8J_R9XX0t-QY-0PzXXXiN0-7vo",
"OwnerIds": [

View file

@ -4,7 +4,7 @@ Have you ever felt confused or even overwhelmed when trying to set Nadeko's perm
## Why do we use the Permissions Commands?
Permissions are very handy at setting who can use what commands in a server. All commands and modules are enabled by default. If something is a bot owner only command, it can only be ran by the bot owner, the person who is running the bot, or has their ID in the [credentials.json](jsons-explained.md) file.
Permissions are very handy at setting who can use what commands in a server. All commands and modules are enabled by default. If something is a bot owner only command, it can only be ran by the bot owner, the person who is running the bot, or has their ID in the [creds.yml](creds-guide.md) file.
Several commands still require that you have the correct permissions on Discord to be able to use them, so for users to be able to use commands like `.kick` and `.voicemute`, they need **Kick** and **Mute Members** server permissions, respectively.

View file

@ -74,6 +74,7 @@ markdown_extensions:
nav:
- Home: index.md
- Guides:
- (!) Migration Guide: guides/migration-guide.md
- Windows Guide: guides/windows-guide.md
- Linux Guide: guides/linux-guide.md
- OSX Guide: guides/osx-guide.md
@ -83,8 +84,8 @@ nav:
- Readme: commands-readme.md
- Commands List: https://nadeko.bot/commands
- Features Explained:
- Creating and inviting the bot: create-invite.md
- Credentials & API Keys: jsons-explained.md
- Basic Creds: creds-guide.md
- Advanced Creds: jsons-explained.md
- Permissions System: permissions-system.md
- Custom Reactions: custom-reactions.md
- Placeholders: placeholders.md

View file

@ -1,32 +0,0 @@
{
"Token": "",
"OwnerIds": [
105635576866156544
],
"LoLApiKey": "",
"GoogleApiKey": "",
"MashapeKey": "",
"OsuApiKey": "",
"SoundCloudClientId": "",
"CleverbotApiKey": "",
"CarbonKey": "",
"Db": {
"Type": "sqlite",
"ConnectionString": "Data Source=data/NadekoBot.db"
},
"TotalShards": 1,
"PatreonAccessToken": "",
"PatreonCampaignId": "334038",
"RestartCommand": null,
"ShardRunCommand": "",
"ShardRunArguments": "",
"ShardRunPort": null,
"BotListToken": null,
"TwitchClientId": null,
"VotesToken": null,
"VotesUrl": null,
"RedisOptions": null,
"LocationIqApiKey": null,
"TimezoneDbApiKey": null,
"CoinmarketcapApiKey": null
}