diff --git a/README.md b/README.md index 15dd504ea..7201dca16 100644 --- a/README.md +++ b/README.md @@ -2,30 +2,34 @@ ⚠ If you're already hosting NadekoBot, You **MUST** update to latest version of 2.x and **run your bot at least once** before switching over to v3 +todo: how to migrate 2.x repo to v3 repo + ## Installation -- [Windows - Release](windows-release) -- [Linux - Release](linux-release) -- [Windows - From Source ](windows-from-source) -- [Linux - From Source](linux-from-source) +- [Windows - Release](#windows-release) +- [Linux - Release](#linux-release) +- [Windows - From Source ](#windows-from-source) +- [Linux - From Source](#linux-from-source) - [Docker] ### Windows From Source -#### Prerequisites +###### Prerequisites Install these before proceeding - [.net 5](https://dotnet.microsoft.com/download/dotnet/5.0) - needed to compile and run the bot - [git](https://git-scm.com/downloads) - needed to clone the repository (you can also download the zip manually and extract it but this guide assumes you're using git) - [redis](https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi) - to cache things needed by some features and persist through restarts +###### Instructions + Open PowerShell (press windows button on your keyboard and type powershell, it should show up), and navigate to the location where you want to install the bot (for example `cd ~/Desktop/`) 1. `git clone https://gitlab.com/kwoth/nadekobot -b v3 --depth 1` 3. `dotnet publish -c Release -o output/ src/NadekBot/` 4. `cd output && cp creds_example.yml creds.yml` 5. Open `creds.yml` with your favorite text editor (Please don't use notepad or wordpad. You can use notepad++, vscode, atom, sublime or something similar) -6. [Enter your bot's token](creds-guide) +6. [Enter your bot's token](#creds-guide) 7. Run the bot `dotnet NadekoBot.dll` 8. 🎉 @@ -35,24 +39,34 @@ In order to use music commands, you need ffmpeg and youtube-dl installed. - [ffmpeg-32bit] | [ffmpeg-64bit] - Download the **appropriate version** for your system (32 bit if you're running a 32 bit OS, or 64 if you're running a 64bit OS). Unzip it, and move `ffmpeg.exe` to a path that's in your PATH environment variable. If you don't know what that is, then just move the `ffmpeg.exe` file to nadekobot/output - [youtube-dl] - Click to download the file. Then put `youtube-dl.exe` in a path that's in your PATH environment variable. If you don't know what that is, then just move the `youtube-dl.exe` file to NadekoBot/system -### Windows From Source +### Linux From Source + +###### Prerequisites -#### Prerequisites - [.net 5](https://dotnet.microsoft.com/download/dotnet/5.0) - [git](https://git-scm.com/downloads) +###### Instructions + +1. `git clone https://gitlab.com/kwoth/nadekobot -b v3 --depth 1` +2. `cd nadekobot && dotnet publish -c Release -o output/ src/NadekBot/` +3. `cd output && cp creds_example.yml creds.yml` +4. Open `creds.yml` with your favorite text editor (Please don't use notepad or wordpad. You can use notepad++, vscode, atom, sublime or something similar) +5. [Enter your bot's token](creds-guide) +6. Run the bot `dotnet NadekoBot.dll` +7. 🎉 + ## Creds Guide This document aims to guide you through the process of creating a Discord account for your bot (the Discord Bot application), and inviting that account into your Discord server. -![img2](https://cdn.nadeko.bot/tutorial/bot-creds-guide.gif) +![Create a bot application and copy token to creds.yml file](https://cdn.nadeko.bot/tutorial/bot-creds-guide.gif) - Go to [the Discord developer application page][DiscordApp]. - Log in with your Discord account. - Click **New Application** - Fill out the `Name` field (it's your app's name) -- Copy Client Id to `creds.yml` - Go to the **Bot** tab on the left sidebar. - Click on the `Add a Bot` button and confirm that you do want to add a bot to this app. - **Optional:** Add bot's avatar and description @@ -60,13 +74,13 @@ 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. -### Inviting your bot to your server +#### Inviting your bot to your server -![img4](https://cdn.nadeko.bot/tutorial/bot-invite-guide.gif) +![Invite the bot to your server](https://cdn.nadeko.bot/tutorial/bot-invite-guide.gif) todo: update gif to show enabling of privileged intents -- On the **General Information** tab, copy your `Client ID` from your [applications page][DiscordApp]. +- On the **General Information** tab, copy your `Application ID` from your [applications page][DiscordApp]. - Replace the `YOUR_CLIENT_ID_HERE` in this link: `https://discordapp.com/oauth2/authorize?client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=66186303` with your `Client ID` - The link should now look something like this: @@ -77,7 +91,6 @@ todo: update gif to show enabling of privileged intents That's it! You may now go back to the installation guide you were following previously 🎉 [DiscordApp]: https://discordapp.com/developers/applications/me -[Invite Guide]: https://tukimoop.pw/s/guide.html [ffmpeg-32bit]: https://cdn.nadeko.bot/dl/ffmpeg-32.zip [ffmpeg-64bit]: https://cdn.nadeko.bot/dl/ffmpeg-64.zip [youtube-dl]: https://yt-dl.org/downloads/latest/youtube-dl.exe diff --git a/src/NadekoBot/creds.yml b/src/NadekoBot/creds.yml deleted file mode 100644 index a0a29c6e5..000000000 --- a/src/NadekoBot/creds.yml +++ /dev/null @@ -1,57 +0,0 @@ -# DO NOT CHANGE -version: 1 -# Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/ -token: -# List of Ids of the users who have bot owner permissions -# **DO NOT ADD PEOPLE YOU DON'T TRUST** -ownerIds: -# The number of shards that the bot will running on. -# Leave at 1 if you don't know what you're doing. -totalShards: 1 -# Login to https://console.cloud.google.com, create a new project, go to APIs & Services -> Library -> YouTube Data API and enable it. -# Then, go to APIs and Services -> Credentials and click Create credentials -> API key. -# Used only for Youtube Data Api (at the moment). -googleApiKey: '' -# Settings for voting system for discordbots. Meant for use on global Nadeko. -votes: - url: '' - key: '' -# Patreon auto reward system settings. -# go to https://www.patreon.com/portal -> my clients -> create client -patreon: -# Access token. You have to manually update this 1st of each month by refreshing the token on https://patreon.com/portal - accessToken: '' - # Unused atm - refreshToken: '' - # Unused atm - clientSecret: '' - # Campaign ID of your patreon page. Go to your patreon page (make sure you're logged in) and type "prompt('Campaign ID', window.patreon.bootstrap.creator.data.id);" in the console. (ctrl + shift + i) - campaignId: '' -# Api key for sending stats to DiscordBotList. -botListToken: '' -# Official cleverbot api key. -cleverbotApiKey: '' -# Redis connection string. Don't change if you don't know what you're doing. -redisOptions: localhost:6379,syncTimeout=30000,responseTimeout=30000,allowAdmin=true,password= -# Database options. Don't change if you don't know what you're doing. Leave null for default values -db: -# Database type. Only sqlite supported atm - type: sqlite - # Connection string. Will default to "Data Source=data/NadekoBot.db" - connectionString: Data Source=data/NadekoBot.db -restartCommand: -votesUrl: -votesToken: -# Api key obtained on https://rapidapi.com (go to MyApps -> Add New App -> Enter Name -> Application key) -rapidApiKey: -# https://locationiq.com api key (register and you will receive the token in the email). -# Used only for .time command. -locationIqApiKey: -# https://timezonedb.com api key (register and you will receive the token in the email). -# Used only for .time command -timezoneDbApiKey: -# https://pro.coinmarketcap.com/account/ api key. There is a free plan for personal use. -# Used for cryptocurrency related commands. -coinmarketcapApiKey: -# Api key used for Osu related commands. Obtain this key at https://osu.ppy.sh/p/api -osuApiKey: