Killed history

This commit is contained in:
Kwoth
2021-09-06 21:29:22 +02:00
commit 7aca29ae8a
950 changed files with 366651 additions and 0 deletions

BIN
docs/assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
docs/assets/patreon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
docs/assets/paypal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

164
docs/bce-guide.md Normal file
View File

@@ -0,0 +1,164 @@
# BotConfigEdit Guide
!!! missing "Obsolete"
`.bce` command is removed in newer versions. If you're on version 2.39.0 or later, use [config guide][CONFIG GUIDE]
`.bce` allows you to conveniently set many of the bot-wide settings that Nadeko has, such as what the currency looks like, what people get when they use `.help`, and so on.
Below is a list of all the settings that can be set, with a quick instruction on how to use them, and their default value.
## BetflipMultiplier
The reward multiplier for correctly guessing a `.bf` (betflip) bet. Keep in mind you can't change the chance to guess the correct flip. It's always 50%.
**Default is 1.95 (in other words, if you bet 100 and guess, you will get 195 as a reward)**
## Betroll100Multiplier
The reward multiplier for rolling 100 on `.br`.
**Default is 10.0**
## Betroll67Multiplier
The reward multiplier for rolling 67 or higher on `.br`.
**Default is 2.0**
## Betroll91Multiplier
The reward multiplier for rolling 91 or higher on `.br`.
**Default is 4.0**
## GroupGreets
Toggles whether your bot will group greet/bye messages into a single message every 5 seconds.
1st user who joins will get greeted immediately
If more users join within the next 5 seconds, they will be greeted in groups of 5. This will cause %user.mention% and other placeholders to be replaced with multiple users. Keep in mind this might break some of your embeds - for example if you have %user.avatar% in the thumbnail, it will become invalid, as it will resolve to a list of avatars of grouped users.
## CurrencyGenerationPassword
Either `true` or `false` value on whether the currency spawned with `.gc` command will have a random password associated with it in the top left corner. This helps prevent people who lurk in the chat and just spam `.pick` to gain flowers.
**Default is `false`**
## CurrencyGenerationChance
A number between 0.0 and 1.0 which represents the chance that a message sent to a channel where `.gc` is enabled will spawn currency. 0 is 0% and 1.0 is 100%.
**Default is 0.02. (That's 2% chance)**
## CurrencyGenerationCooldown
A number of seconds that the bot is guaranteed not to spawn any flowers again after doing so in a channel where `.gc` is enabled. This is useful if you have a pretty high chance of the flowers spawning in the channel (for whatever stupid reason) and don't want the chat to be flooded with currency spawn messages.
**Default is 10**
## CurrencyName
Name of your currency. Mostly people aren't creative with this and just call them "Credit" or "Dollar". You can do better :^)
**Default is NadekoFlower**
## CurrencySign
Emoji of your currency. You can use server emojis, though occasionally it will fail to send it correctly on other servers.
**Default is 🌸**
## DmHelpString
The string which will be sent whenever someone DMs the bot. Supports embeds. How it looks: [https://puu.sh/B0BLV.png](https://puu.sh/B0BLV.png)
**Default is "Use `.h` for help"**
## HelpString
The strings which will be sent whenever someone types `.h`. Supports embeds. You can also use {0} placeholder which will be replaced with your bot's client id, and {1} placeholder which will be replaced with your bot's prefix. How it looks: [https://puu.sh/B0BMa.png](https://puu.sh/B0BMa.png)
**Default is too long to type out (check the screenshot)**
## CurrencyDropAmount
The amount of currency which will drop when `.gc` spawn is triggered. This will be the minimum amount of currency to be spawned if CurrencyDropAmountMax is also specified.
**Default is 1**
## CurrencyDropAmountMax
Setting this value will make currency generation spawn a random amount of currency between CurrencyDropAmount and CurrencyDropAmountMax, inclusive.
**Default is 0**
## TriviaCurrencyReward
The amount of currency awarded to the winner of the trivia game.
**Default is 0**
## XpPerMessage
The amount of XP the user receives when they send a message (which is not too short).
**Default is 3**
## XpMinutesTimeout
This value represents how often the user can receive XP from sending messages.
**Default is 5**
## MinWaifuPrice
Minimum price the users can pay to claim a waifu with `.claim`.
**Default is 50**
## WaifuGiftMultiplier
The multiplier applied to the price of waifu gifts, making them more or less expensive.
**Default is 1**
## MinimumTriviaWinReq
Users can't start trivia games which have smaller win requirement than specified by this setting.
**Default is 0**
## MinBet
Minimum amount of currency a user can gamble with in a single gamble. Set 0 to disable.
**Default is 0**
## MaxBet
Maximum amount of currency a user can gamble with in a single gamble. Set 0 to disable.
**Default is 0**
## OkColor
Hex of the color which will show on the left side of the bot's response when a command succesfully executes. Example: [https://puu.sh/B0BXd.png](https://puu.sh/B0BXd.png)
**Default is 00e584**
## ErrorColor
Hex of the color which will show on the left side of the bot's response when a command either errors, or you can't perform some action. Example: [https://puu.sh/B0BXs.png](https://puu.sh/B0BXs.png)
**Default is ee281f**
## ConsoleOutputType
2 values, either 'Simple' or 'Normal'. Normal is the usual amount, and the simple one shows only basic info about the executed commands in the console. Here is a comparison: [https://puu.sh/B0Chn.png](https://puu.sh/B0Chn.png)
**Default is 'Normal'**
## DailyCurrencyDecay
The percentage of currency all users will lose every 24 hours. The value goes between 0 and 1.0 (0 being 0% to 1.0 being 100%). This is a useful tool to control the inflation :)
**Default is 0**
## CheckForUpdates
Whether the bot will see if there are updates available. The patch notes will be sent to Bot Owner's DM. The bot checks for updates once every 8 hours. There are 3 available values:
- None: The bot will not check for updates
- Commit: This is useful for linux self-hosters - the bot will check for any new commit on the NadekoBot repository.
- Release: This is useful for windows self-hosters - the bot will check for any new releases published on the NadekoBot repository. This setting is also useful for linux self-hosters who only want to update when it's pretty safe to do so :)
**Default is Release**
## PatreonCurrencyPerCent
You need this only if you have a patreon page, and you've specified the PatreonCampaignId and PatreonAccessToken in credentials.json. This value is the amount of currency the users will get with `.clparew` for each cent they've pledged. Also make sure your patreon is set to charge upfront, otherwise people will be able to pledge, claim reward and unpledge without getting charged.
**Default is 1**
## VoiceXpPerMinute
The average amount of xp added every minute to a user connected to a voice channel.
**Default is 3**
## MaxXpMinutes
The maximum amount of time, in minutes, a user can earn xp in a voice channel. This exists mainly to clear entries out of Redis.
**Default is 720**
[CONFIG GUIDE]: config-guide.md

29
docs/commands-readme.md Normal file
View File

@@ -0,0 +1,29 @@
# Readme for Commands List
## Bot Owner Only
- *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.
- You are **not** the bot **owner** if you invited the bot using **Carbonitex** or other invitation links.
## Music on the public Nadeko
- In case you got Nadeko in your server by the invitation from **Carbonitex**, our **GitLab** invite or **help (.h)**, music is disabled.
- Music is **disabled** due to large maintenance expenses, unless Kwoth is **testing** music module.
- If you want to have music module on your server, you will have to **host** the bot on your PC, or any of the external servers.
- How to **host** the bot, check the **guides** on the left side.
## NadekoFlowers
- NadekoFlowers is the **currency** of the public Nadeko.
- NadekoFlowers can be `.pick`ed after Nadeko plants a flower randomly after `.gc` has been enabled on a channel
- You can give NadekoFlowers to other users, using the command `.give X @person`.
- You can only give flowers you **own**.
- If you want to have **unlimited** number of flowers, you will have to **host** the bot.
- Commands `.award X @person` and `.take X @person` can only be used by the *bot owner*.
- If you `.plant` the flower, flower will be avaliable for everyone to `.pick` it. In that case you will **lose** the flower.
## Manage Permissions
**These permissions refer to the permissions you can set in Discord settings for individual users or roles.**

66
docs/config-guide.md Normal file
View File

@@ -0,0 +1,66 @@
# Config
`.config` is the new `.bce`, it gives you a fast and easy way to edit most bot settings/values. Use `.h .config` for explanation.
Use `.config` to see the list of editable config files
Use `.config <config-name>` to see the list of settable properties on that config
Use `.config <config-name> <setting>` to see the current value and description
Use `.config <config-name> <setting> value` to set a new value
All settings are only available if you edit `data/[config-name].yml` files manually.
If you edit the files manually, you can reload configuration with `.configreload <config-name>`
The list below is not complete. Use commands above to see up-to-date list for your version.
## XP
`txt.cooldown` - Sets a timeout value in which a user cannot gain any more xp from sent messages. ( Value is in minutes )
`txt.per_msg` - Sets a value for the amount of xp a user will receive from sending a message.
`voice.per_minute` - Sets how much xp a user will receive from being active in a voice channel.
`voice.max_minutes` - Restricts a users xp gain to a certain amount of time spent in a voice channel.
*more settings may be available in `data/xp.yml` file*
## Games
`trivia.min_win_req` - Restricts a user's ability to make a trivia game with a win requirement less than the set value.
`trivia.currency_reward` - Sets the amount of currency a user will win if they place first in a completed trivia game.
*more settings may be available in `data/games.yml` file*
## Bot
`color.ok` - Sets a hex color that will be shown on the side bar of a successful command.
`color.error` - Sets a hex color that will be shown on the side bar of an unsuccessful command.
`color.pending` - Sets a hex color that will be shown on the side bar of a command that is currently in progress.
`help.text` - The text a user is DM'd when they invoke the `.h` command.
`help.dmtext` - The text a user will receive when they DM the bot directly.
`console.type` - Sets the style in which commands will show up in your console, values: `Simple`, `Normal`, `None`.
`locale` - Sets your native bot language, run the `.langli` command in a Discord channel for a full list of language options.
`prefix` - Sets default prefix for your bot.
*more settings may be available in `data/bot.yml` file*
## Gambling
`currency.name` - Sets the name for your bot's currency.
`currency.sign` - Sets the icon for your currency.
`minbet` - Minimum amount users can bet
`maxbet` - Maximum amount users can bet. Set 0 for unlimited
`gen.min` - Sets the minimum amount that can be spawned with `.gc` active.
`gen.max` - Sets the maximum amount that can be spawned with `.gc` active.
`gen.cd` - Sets a cooldown on how often a flower can spawn with `.gc` active ( Value is in seconds ).
`gen.chance` - Sets the likelihood that flowers will spawn with `.gc`. Value: ( 0.02 = 2% | 1 + 100% ).
`gen.has_pw` - Toggles wether the generated flowers will have a password at the top left of the image. Value: `true` or `false`
`bf.multi` - Sets the amount fo currency a user will win off of a winning a bet flip.
`waifu.min_price` - Sets the minimum price a user must pay to claim a user as their waifu.
`waifu.multi.reset` - Sets a multiplier for the `.waifureset` command.
`waifu.multi.crush_claim` - Sets a discount for a user that is claiming another user that has their affinity set to them.
`waifu.multi.normal_claim` - Amount a user would have to spend to claim a waifu with no affinity set.
`waifu.multi.divorce_value` - Sets how much a user would get if they divorce a waifu.
`waifu.multi.all_gifts` - Sets how much of a gifts value will be added to the value of the gifted waifu.
`waifu.multi.gift_effect` - Sets a bonus amount that a waifu will receive if they have their affinity set to the gifter.
`decay.percent` - Sets the percentage to decay all users currency daily.
`decay.maxdecay` - Sets the maximum a amount that a user's currency can decay in a day.
`decay.threshold` - Sets the minimum amount that a user must have to be eligible to receive a decay.
*more settings may be available in `data/gambling.yml` file*

View File

@@ -0,0 +1,9 @@
# How to contribute
1. Make Merge Requests to the [**1.9 branch**][1.9-branch].
2. Keep a single Merge Request to a single feature.
3. Explain what you did in the MR message.
Thanks for all your help ^\_^
[1.9-branch]: https://gitlab.com/Kwoth/nadekobot/tree/1.9

35
docs/create-invite.md Normal file
View File

@@ -0,0 +1,35 @@
# Creating and inviting your bot
## Creating a Discord application
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://i.imgur.com/Vxxeh2n.gif)
- Go to [the Discord developer application page][DiscordApp].
- Log in with your Discord account.
- Create an application.
- On the **General Information** tab, fill out the `Name` field (it's your app's name)
- Upload an image if you want and add an app description. **(Optional)**
- 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.
- 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.
![img3](https://i.imgur.com/iuq2901.gif)
## Inviting your bot to your server
![img4](https://i.imgur.com/6beUSa5.gif)
- On the **General Information** tab, copy your `Client ID` from your [applications page][DiscordApp].
- Replace the **`12345678`** in this link:
`https://discordapp.com/oauth2/authorize?client_id=`**`12345678`**`&scope=bot&permissions=66186303` with your `Client ID`.
- The link should now look like this:
`https://discordapp.com/oauth2/authorize?client_id=`**`YOUR_CLIENT_ID_HERE`**`&scope=bot&permissions=66186303`
- Access that newly created link, pick your Discord server, click `Authorize` and confirm with the captcha at the end.
- The bot should have been added to your server.
[Google Console]: https://console.developers.google.com
[DiscordApp]: https://discordapp.com/developers/applications/me
[Invite Guide]: https://tukimoop.pw/s/guide.html

44
docs/custom-reactions.md Normal file
View File

@@ -0,0 +1,44 @@
## Custom Reactions / Expressions
### Important
- For modifying **global** custom reactions, the ones which will work across all the servers your bot is connected to, you **must** be a Bot Owner.
You must also use the commands for adding, deleting and listing these reactions in a direct message with the bot.
- For modifying **local** custom reactions, the ones which will only work on the server that they are added on, it is required to have the **Administrator** permission.
You must also use the commands for adding, deleting and listing these reactions in the server you want the custom reactions to work on.
### Commands and Their Use
| Command Name | Description | Example |
| :----------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- |
| `.acr` | Add a custom reaction with a trigger and a response. Running this command in a server requries the Administrator permission. Running this command in DM is Bot Owner only, and adds a new global custom reaction. | `.acr "hello" Hi there, %user%!` |
| `.lcr` | Lists a page of global or server custom reactions (15 reactions per page). Running this command in a DM will list the global custom reactions, while running it in a server will list that server's custom reactions. | `.lcr 1` |
| `.dcr` | Deletes a custom reaction based on the provided index. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only, and will delete a global custom reaction. | `.dcr 5` |
#### Now that we know the commands let's take a look at an example of adding a command with `.acr`,
`.acr "Nice Weather" It sure is, %user%!`
This command can be split into two different arguments:
- The trigger, `"Nice Weather"`
- And the response, `It sure is, %user%!`
An important thing to note about the triger is that, to be more than one word, we had to wrap it with quotation marks, `"Like this"` otherwise, only the first word would have been recognised as the trigger, and the second word would have been recognised as part of the response.
There's no special requirement for the formatting of the response, so we could just write it in exactly the same way we want it to respond, albeit with a placeholder - which will be explained in this next section.
Now, if that command was ran in a server, anyone on that server can make the bot mention them, saying `It sure is, @Username` anytime they say "Nice Weather". If the command is ran in a direct message with the bot, then the custom reaction can be used on every server the bot is connected to.
### Block global Custom Reactions
If you want to disable a global custom reaction which you do not like, and you do not want to remove it, or you are not the bot owner, you can do so by adding a new Custom Reaction with the same trigger on your server, and set the response to `-`.
For example:
`.acr /o/ -`
Now if you try to trigger `/o/`, it won't print anything even if there is a global custom reaction with the same name.
### Placeholders!
To learn about placeholders, go [here](placeholders.md)

38
docs/donate.md Normal file
View File

@@ -0,0 +1,38 @@
# Donate
Nadeko is an [open-source project][gitlab], and we rely on your help to develop the bot, pay hosting fees, maintain our website and more.
Donations go a long way in helping us keep the project alive, and we appreciate every single one of them.
## Perks
Donating to us also gives you the following benefits:
- A hoisted **Donators role** in our [Discord server][discord-server]
- Access to exclusive **#noticed** text and voice channels
- **1000 flowers** on the public bot per dollar donated (after fees)
- **Custom Reactions** on the public bot for [Patreon pledges][patreon] of $5 or higher
## Patreon
You can set up a monthly pledge on [Patreon][patreon] and support the project's growth, and also get flower rewards for every month you donate!
!!! Note
Connect your Discord account on Patreon and then use the `.clparew` command after pledging to receive flower rewards.
[![img][patreon-button]][patreon]
## PayPal
You can also donate to us through [PayPal][paypal] for one-time donations using the button below, or by donating to `nadekodiscordbot@gmail.com`.
!!! Note
Mention your Discord tag (Username#1234) in the payment note to receive flower rewards.
[![img][paypal-button]][paypal]
[gitlab]: https://gitlab.com/Kwoth/nadekobot
[discord-server]: https://discord.nadeko.bot/
[patreon]: https://www.patreon.com/nadekobot
[patreon-button]: ./assets/patreon.png
[paypal]: https://paypal.me/Kwoth
[paypal-button]: ./assets/paypal.png

View File

@@ -0,0 +1,7 @@
# Setting up NadekoBot with Docker
Hosting Nadeko with Docker is not officially supported until the next major version (3.0)
If you've been previously hosting with Docker, please move to one of the other hosting options.
You may ask for guidance on our [discord server.][discord-server]
[discord-server]: https://discord.nadeko.bot

168
docs/guides/from-source.md Normal file
View File

@@ -0,0 +1,168 @@
## Setting up NadekoBot From Source
| Table of Contents |
| :-------------------------------------------------------------------------------------------------------------------------------------- |
| [Installing with the CLI Installer](#installing-with-the-cli-installer) |
| [Setup (CLI)](#setup-cli) |
| [Launching Nadeko (CLI)](#launching-nadeko-cli) |
| [Installing Nadeko Manually](#installing-nadeko-manually) |
| [Setup](#setup) |
| [Launching Nadeko](#launching-nadeko) |
| [Updating Nadeko](#updating-nadeko) |
### Installing with the CLI Installer
This is the recommended way of installing Nadeko from source. If you don't want to use the installer, skip to [Installing Nadeko Manually](#installing-nadeko-manually).
#### Prerequisites (CLI)
- Windows 7 or later
- If you are on Windows 7, you must update [PowerShell].
- [.net5 SDK][.net] (restart Windows after installation)
- [Git] (select [this option](https://i.imgur.com/zlWVTsi.png) during the installation process)
- Redis
- Windows 64 bit: Download and install the [latest msi][Redis]. Don't forget to [add it to the path environment variable](https://i.imgur.com/uUby6Xw.png) during the installation process.
- Windows 32 bit: Skip this step
- [Create a Discord Bot application](../../create-invite/#creating-discord-bot-application) and [invite the bot to your server](../../create-invite/#inviting-your-bot-to-your-server).
**Optional**
If you want Nadeko to play music, do the following:
- Install [Visual C++ 2010 (x86)] and [Visual C++ 2017] (both are required - restart Windows after installation)
- [youtube-dl] - Click on `Windows.exe` (on the top left corner) and download the file. Then move it to **`C:\youtube-dl`**. If the folder `youtube-dl` doesn't exist, create one.
#### Setup (CLI)
- Download the [CLI installer](https://cdn.discordapp.com/attachments/287982972664020994/416782797420888074/NadekoInstaller.zip). Move it to where you want Nadeko's files to be.
- Right click the file and extract it.
- Right click the **`NadekoInstaller.bat`** file and open it as Administrator.
- After the admin check, you should see main menu with the options below:
```
1. Download Latest Build
2. Run NadekoBot (normally)
3. Run NadekoBot with Auto Restart (check "if" nadeko is working properly, before using this)
4. Setup credentials.json
5. Install ffmpeg (for music)
6. Redis Installation (Opens Website) (64bit)
7. Run Redis (if its not running) (64bit)
8. Install Youtube-dl. (Opens Website)
9. Add Youtube-dl to PATH.
10. Add Redis to PATH. (Advanced Users Only) ("Run Redis" is enough for Normal Users.) (64bit)
11. Install .NET Core SDK (Opens Website)
12. Install Git. (Opens Website)
13. Copy libsodium and opus dll files for 32bit users. (Required for 32bit, Music)
14. Download and run redis-server for 32bit users. (32bit)
15. [NEW] NadekoBot Extensions
16. To exit
```
- Run Option `1` to download Nadeko (type 1 and press Enter). Once it's done, it should take you back to the main menu.
- Run Option `4` to [set up your credentials](../../jsons-explained). Paste the info as requested.
- **If your Windows is 32-bit**, run Option `14` now. Otherwise, ignore this step.
- Nadeko should be ready to launch. Run Option `2` to test it out. If everything goes well, Nadeko should appear as online on your Discord server and respond to commands. Once you're done with testing, type **`.die`** to shut it down and return to the installer's main menu.
If you don't want the music features, you can launch Nadeko with Option `3` and have fun with your newly created bot. Otherwise, follow the steps below.
- If you haven't downloaded **`youtube-dl.exe`** and moved it to **`C:\youtube-dl`** yet, then do it now.
- **If your Windows is 32-bit**, run Option `13`. Otherwise, ignore this step.
- Run Option `5` to download **`ffmpeg`**.
- Run Option `9` to add **`youtube-dl.exe`** to your system's path environment variable.
- That's it. You're done. Launch Nadeko with Option `3` and have fun sharing music with your friends.
#### Launching Nadeko (CLI)
- Just open the CLI installer and run Option `2` or `3`. Easy as that.
---
### Installing Nadeko Manually
This is the *"hard"* way of installing Nadeko. If you're here, we are assuming you know what the hell you're doing.
#### Prerequisites
- Windows 7 or later
- [.net5 SDK][.net] (restart Windows after installation)
- [Git] (select [this option](https://i.imgur.com/zlWVTsi.png) during the installation process)
- Redis
- Windows 64 bit: Download and install the [latest msi][Redis]. Don't forget to [add it to the path environment variable](https://i.imgur.com/uUby6Xw.png) during the installation process.
- Windows 32 bit: Download [redis-server.exe](https://github.com/MaybeGoogle/NadekoFiles/blob/master/x86%20Prereqs/redis-server.exe?raw=true) and store it somewhere accessible.
- [Create a Discord Bot application](../../jsons-explained/#creating-discord-bot-application) and [invite the bot to your server](../../jsons-explained/#inviting-your-bot-to-your-server).
**Optional**
If you want Nadeko to play music, do the following:
- [Notepad++] (makes it easier to edit your credentials)
- Install [Visual C++ 2010 (x86)] and [Visual C++ 2017] (both are required - restart Windows after installation)
- [youtube-dl] - Click on `Windows.exe` (on the top left corner) and download the file. Store it somewhere accessible.
- [ffmpeg-32bit] / [ffmpeg-64bit] - Download the version for your architecture. Extract it, then find and copy the `ffmpeg.exe` file to somewhere accessible.
- **For 32-bit Windows**, download [libsodium](https://github.com/MaybeGoogle/NadekoFiles/blob/master/x86%20Prereqs/NadekoBot_Music/libsodium.dll?raw=true) and (lib)[opus](https://github.com/MaybeGoogle/NadekoFiles/blob/master/x86%20Prereqs/NadekoBot_Music/opus.dll?raw=true) and store them somewhere accessible.
#### Setup
- Open command prompt (`cmd.exe`) and run the following command to download the source:
- `git clone -b 1.9 https://gitlab.com/Kwoth/NadekoBot`
- On Windows Explorer, go to `NadekoBot/src/NadekoBot` and edit the `credentials.json` file according to this [guide](../../jsons-explained/#setting-up-credentialsjson-file).
- Add these 2 arguments to your credentials file:
```js
"ShardRunCommand": "dotnet",
"ShardRunArguments": "run -c Release --no-build -- {0} {1}",
```
- Move **`youtube-dl.exe`** and **`ffmpeg.exe`** into `NadekoBot/src/NadekoBot` (or add them to your PATH environment variable, if you know how)
- **For 32-bit Windows**, replace **`libsodium.dll`** and **`opus.dll`** in `NadekoBot/src/NadekoBot` with the ones you've downloaded.
#### Launching Nadeko
- **For 32-bit Windows**, run the **`redis-server.exe`** you have downloaded. You **must** have this window open while using NadekoBot.
- On command prompt, move to the correct directory:
- `cd NadekoBot/src/NadekoBot`
- Build and run Nadeko:
- `dotnet run -c Release`
- If everything goes well, Nadeko should start up and show as online in your Discord server.
---
### Updating Nadeko
**If you have not made custom edits to the source code.**
- If you're using the CLI installer, shut your bot down and run Option `1`. That's it.
- If you've installed manually, open command prompt (`cmd.exe`)
- Move to Nadeko's root folder:
- `cd NadekoBot`
- Update Nadeko:
- `git pull`
**If you have made custom edits to the source code.**
- Open command prompt (`cmd.exe`)
- Move to Nadeko's root folder:
- `cd NadekoBot`
- Stash your changes:
- `git stash save "give me a nice name dd-mm-yyyy"` or just `git stash`
- Update Nadeko:
- `git pull`
- Apply your stash:
- `git stash apply` or `git stash apply stash@{n}` (where `n` is the ID of the stash)
Other useful commands:
- `git status` to check the changes you've made
- `git stash list` to see the list of saved stashes and their corresponding ID
- `git stash drop stash@{n}` to delete a specific stash
- `git stash pop stash@{n}` to apply and delete a specific stash
[Notepad++]: https://notepad-plus-plus.org/
[PowerShell]: https://www.microsoft.com/en-us/download/details.aspx?id=54616
[.net]: https://dotnet.microsoft.com/download/dotnet/5.0
[Redis]: https://github.com/MicrosoftArchive/redis/releases/tag/win-3.0.504
[Git]: https://git-scm.com/downloads
[Visual C++ 2010 (x86)]: https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
[Visual C++ 2017]: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
[ffmpeg-32bit]: https://cdn.nadeko.bot/dl/ffmpeg-32.zip
[ffmpeg-64bit]: https://cdn.nadeko.bot/dl/ffmpeg-64.zip
[youtube-dl]: https://rg3.github.io/youtube-dl/download.html

275
docs/guides/linux-guide.md Normal file
View File

@@ -0,0 +1,275 @@
## Setting up NadekoBot on Linux
| Table of Contents |
| :-------------------------------------------------- |
| [Getting Started] |
| [Downloading and Installing the Prerequisites] |
| [Installing Nadeko] |
| [Setting up, Running and Updating Nadeko with pm2] |
| [Running Nadeko on tmux] |
| [Making Nadeko persist upon system restarts (tmux)] |
| [Setting up Nadeko on a VPS (Digital Ocean)] |
#### Operating System Compatibility
It is recommended that you use **Ubuntu 16.04**, as there have been nearly no problems with it. Music features are currently not working on Debian and CentOS. Also, **32-bit systems are incompatible**.
##### Compatible operating systems:
- Ubuntu: 16.04, 18.04, 20.04
- Mint: 17, 18
- Debian: 9, 10
- CentOS: 7, 8
#### Getting Started
- Use the following command to get and run the **`linuxAIO.sh`** installer
- (PS: **Do Not** rename the **`linuxAIO.sh`** file)
`cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.9/linuxAIO.sh && bash linuxAIO.sh`
You should see the main menu with the following options:
```
1. Download NadekoBot
2. Run Nadeko (Normally)
3. Run Nadeko with Auto Restart (Run Nadeko normally before using this.)
4. Auto-Install Prerequisites (For Ubuntu, Debian and CentOS)
5. Set up credentials.json (If you have downloaded NadekoBot already)
6. Set up pm2 for NadekoBot (see README)
7. Start Nadeko in pm2 (complete option 6 first)
8. Exit
```
#### Downloading and Installing the Prerequisites
- **If** you are running NadekoBot for the first time on your system and never had any *prerequisites* installed, press `4` and `enter` key, then `y` once you see the following:
```
Welcome to NadekoBot Auto Prerequisites Installer.
Would you like to continue?
```
- This will install all prerequisites your system needs in order to run NadekoBot.
- (Optional) **If** you prefer to install them manually, you can try finding them [here](https://github.com/Kwoth/NadekoBot-BashScript/blob/1.9/nadekoautoinstaller.sh).
Once it finishes, the installer should automatically take you back to the main menu.
#### Installing Nadeko
- Choose Option `1` to get the **most updated build of NadekoBot**. When the installation is complete, you will see the options again.
- If you haven't [set up your Discord bot application](../../create-invite/#creating-discord-bot-application) and [invited the bot to your server](../../create-invite/#inviting-your-bot-to-your-server) yet, do it now.
- Only the ClientID, Bot Token and OwnerID are required. Everything else is optional.
- The Google API Key is required if you want Nadeko to play music.
- Once you have acquired them, choose Option `5` to set up your credentials.
- You will be asked to enter your credentials. Just follow the on-screen instructions and enter them as requested. (*i.e.* If you are asked to insert the **Bot's Token**, then just copy and paste the **Bot's Token** and hit `Enter`. Rinse and repeat until it's over.)
- If you want to skip any optional information, just press `Enter` without typing/pasting anything.
Once you're done with the credentials, you should be taken back to the main menu.
##### Checking if Nadeko is working
- Choose Option `2` to **Run Nadeko (Normally)**.
- Check in your Discord server if your new bot is working properly. Once you're done testing, type `.die` to shut it down and return to the main menu.
You can now choose Option `3` and have Nadeko run with auto restart. It will work just fine, however it's strongly advised that you use Nadeko with a process manager like pm2 or tmux, as they will keep Nadeko running in the background, freeing up your terminal for other tasks.
---
#### Setting up, Running and Updating Nadeko with [pm2](https://github.com/Unitech/pm2/blob/master/README.md) [strongly recommended]
Nadeko can be run using [pm2](https://github.com/Unitech/pm2), a process manager that seamlessly handles keeping your bot up. Besides, it handles disconnections and shutdowns gracefully, ensuring any leftover processes are properly killed. It also persists on server restart, so you can restart your server or computer and pm2 will manage the startup of your bot. Lastly, there is proper error logging and overall logging. These are just a few features of pm2, and it is a great way to run Nadeko with stability.
##### Setting up pm2/NodeJS for Nadeko
**Before proceeding, make sure your bot is not running by either running `.die` in your Discord server or exiting the process with `Ctrl+C`.**
You may be presented with the installer main menu once you shut your bot down. If not, simply run `bash linuxAIO.sh`.
- Run Option `6` to install NodeJS and pm2.
- If you already have NodeJS and pm2 installed on your system, you can skip this step (which is a one-time thing).
- There is an automated script built in the installer so installation and startup is a breeze. Just select Option `7` to bring you to a menu of choices. These are the normal choices you have for running Nadeko.
```
[1] Start with auto-restart with .die and no auto-update.
[2] Start with auto-restart with .die and auto-update on restart as well.
[3] Run normally without any auto-restart or auto-update functionality.
```
- Simply choose one of these and Nadeko will start in pm2! If you did everything correctly, you can run the following to check your Nadeko setup:
`sudo pm2 status` to see all pm2 processes
`sudo pm2 info Nadeko` information about Nadeko
`sudo pm2 logs Nadeko` to view real-time logs of Nadeko, or
`sudo pm2 logs Nadeko --lines number` (**number** = how many lines you wish to output) to see a specific amount of lines of the log. The logfile is also stored and presented at the top of these commands
##### Updating Nadeko with pm2
- If you have set up Nadeko with auto-update, simply run `.die` on your Discord server. That's it!
- If you have set up Nadeko with **no** auto-update:
- Shut your bot down with `sudo pm2 stop Nadeko`
- Open the installer with `bash linuxAIO.sh` and choose Option `1`
- Once it's done, exit the installer with Option `8` and run `sudo pm2 restart Nadeko`
- You can watch your bot going online with `sudo pm2 logs Nadeko`
---
#### Running Nadeko on tmux [if you don't want to use pm2]
**Before proceeding, make sure your bot is not running by either running `.die` in your Discord server or exiting the process with `Ctrl+C`.**
If you are presented with the installer main menu, exit it by choosing Option `8`.
- Create a new session: `tmux new -s nadeko`
The above command will create a new session named **nadeko** *(you can replace “nadeko” with anything you prefer, it's your session name)*.
- Run the installer: `bash linuxAIO.sh`
- Choose `2` to **Run NadekoBot normally.**
- **NOTE**: With this option, if you use `.die` in Discord, the bot will shut down and stay offline until you manually run it again.
- Choose `3` to **Run NadekoBot with Auto Restart.**
- **NOTE**: With this option, the bot will auto run if you use `.die`, making it to function as restart.
You will be shown the following options:
```
1. Run Auto Restart normally without Updating.
2. Run Auto Restart and update NadekoBot.
3. Exit
```
- With option `1. Run Auto Restart normally without Updating`, the bot will restart on `.die` command and will not download the latest build available.
- With option `2. Run Auto Restart and update NadekoBot`, the bot will restart and download the latest build available everytime the `.die` command is used.
**Now check your Discord server, the bot should be online**
- To move the bot to the background, press **Ctrl+B**, release the keys then hit **D**. That will detach the session, allowing you to finally close the terminal window and not worry about having your bot shut down in the process.
#### Updating Nadeko
- If you're running Nadeko with auto-update, just type `.die` in your Discord server. That's it!
- If you're running Nadeko with **no** auto-update:
- Kill your previous session.
- Check the session name with `tmux ls`
- Kill with `tmux kill-session -t nadeko` (don't forget to replace "nadeko" with whatever you named your bot's session).
- Create a new session: `tmux new -s nadeko`
- Run this command: `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.9/linuxAIO.sh && bash linuxAIO.sh`
- Choose Option `1` to download the most up to date version of Nadeko.
- Once it's done, choose Option `2` or `3` and detach the session by pressing **Ctrl+B**, release then **D**.
#### Additional Information
- If you want to **see the active sessions**, run `tmux ls`. That will give you the list of the currently running sessions.
- If you want to **switch to/see a specific session**, type `tmux a -t nadeko` (**nadeko** is the name of the session we created before so, replace **“nadeko”** with the session name you have created).
- If you want to go through the log, press **Ctrl+B**, release the keys then hit **Page Up** or **Page Down** to navigate.
- Don't forget to always detach from the session by pressing **Ctrl+B** then **D** once you're done.
- If you want **create** a new session, run `tmux new -s nadeko`. If you want to **kill it**, run `tmux kill-session -t nadeko`
#### Making Nadeko persist upon system restarts (tmux - For Advanced Users)
This procedure is completely optional. We'll be using [*systemd*](https://en.wikipedia.org/wiki/Systemd) to handle Nadeko during system shutdowns and reboots.
**1.** Start off by downloading the necessary scripts:
- `cd ~ && wget https://raw.githubusercontent.com/Kaoticz/NadekoBot-BashScript/1.9k/nadeko.service`
- `cd ~ && wget https://raw.githubusercontent.com/Kwoth/NadekoBot-BashScript/1.9/NadekoARN.sh`
- `cd ~ && wget https://raw.githubusercontent.com/Kwoth/NadekoBot-BashScript/1.9/NadekoARU_Latest.sh`
**2.** If you **are** logged in as `root` and **don't want** Nadeko to auto-update, ignore the procedures below and go straight to step 3.
---
- Let's edit the script *systemd* is going to use to start Nadeko: `nano nadeko.service`
- You should see the following:
```css
[Unit]
Description=NadekoBot
[Service]
WorkingDirectory=/root
User=root
Type=forking
ExecStart=/usr/bin/tmux new-session -s Nadeko -d '/bin/sh NadekoARN.sh'
ExecStop=/bin/sleep 2
[Install]
WantedBy=multi-user.target
```
- Change `/root` from *"WorkingDirectory"* to the directory that contains your NadekoBot folder.
- For example, if your bot is located in `/home/username/NadekoBot`, you should change `/root` to `/home/username`.
- Change `root` from *"User"* to whatever username you're using.
- **Optional:** If you want Nadeko to auto-update upon restarts, change `NadekoARN.sh` to `NadekoARU_Latest.sh`.
- Once you're done, press `Ctrl+X` to exit nano, type `y` to confirm the changes and `Enter` to go back to the terminal.
---
**3.** Now the script needs to be moved to where *systemd* stores their services. On Ubuntu, it's usually in `/etc/systemd/system`. If you are not using Ubuntu and are unsure about where *systemd* stores stuff, [Google is your best friend](https://www.google.com/ "MaybeGoogle :^)").
- To do that, run this command: `sudo mv nadeko.service /etc/systemd/system/nadeko.service`
**4.** Now it's time to reload *systemd*, so it loads our new script up: `sudo systemctl daemon-reload`
**5.** Set the script to run upon system restarts: `sudo systemctl enable nadeko`
**6.** Start Nadeko on the current session: `sudo systemctl start nadeko`
And that's it. Every time your system restarts, *systemd* should automatically startup your bot with tmux. If everything has gone well, you should be able to see Nadeko on the list of processes being handled by tmux by running the `tmux ls` command.
#### Managing Nadeko on tmux with systemd
Here is a list of useful commands if you intend on managing Nadeko with *systemd*.
- `tmux ls` - lists all processes managed by tmux.
- `tmux a -t Nadeko` - shows Nadeko's log (press `Ctrl+B` then `D` to exit).
- `sudo systemctl start nadeko` - starts Nadeko, if it has been stoped.
- `sudo systemctl restart nadeko` - restarts Nadeko. Can be used while the bot is being run.
- `sudo systemctl stop nadeko` - completely shuts Nadeko down.
- `sudo systemctl enable nadeko` - makes Nadeko start automatically upon system reboots.
- `sudo systemctl disable nadeko` - stops Nadeko from starting automatically upon system reboots.
- `sudo systemctl status nadeko` - shows some information about your bot (press `Ctrl+C` to exit).
---
### Setting up Nadeko on a Linux VPS (Digital Ocean Droplet)
If you want Nadeko to play music for you 24/7 without having to hosting it on your PC and want to keep it cheap, reliable and convenient as possible, you can try Nadeko on Linux Digital Ocean Droplet using the link [DigitalOcean](http://m.do.co/c/46b4d3d44795/) (by using this link, you will get **$10 credit** and also support Nadeko)
**Setting up NadekoBot**
Assuming you have followed the link above to setup an account and a Droplet with a 64-bit operational system on Digital Ocean and got the `IP address and root password (in your e-mail)` to login, it's time to get started.
**This section is only relevant to those who want to host Nadeko on DigitalOcean. Go through this whole section before setting the bot up.**
#### Prerequisites
- Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
- Download [WinSCP](https://winscp.net/eng/download.php) *(optional)*
- [Create and invite the bot](../../jsons-explained/#creating-discord-bot-application).
#### Starting up
- **Open PuTTY** and paste or enter your `IP address` and then click **Open**.
If you entered your Droplets IP address correctly, it should show **login as:** in a newly opened window.
- Now for **login as:**, type `root` and press enter.
- It should then ask for a password. Type the `root password` you have received in your e-mail address, then press Enter.
If you are running your droplet for the first time, it will most likely ask you to change your root password. To do that, copy the **password you've received by e-mail** and paste it on PuTTY.
- To paste, just right-click the window (it won't show any changes on the screen), then press Enter.
- Type a **new password** somewhere, copy and paste it on PuTTY. Press Enter then paste it again.
**Save the new password somewhere safe.**
After that, your droplet should be ready for use. [Follow the guide from the beginning](#getting-started) to set Nadeko up on your newly created VPS.
[Getting Started]: #getting-started
[Downloading and Installing the Prerequisites]: #downloading-and-installing-the-prerequisites
[Installing Nadeko]: #installing-nadeko
[Setting up, Running and Updating Nadeko with pm2]: #setting-up-running-and-updating-nadeko-with-pm2-strongly-recommended
[Running Nadeko on tmux]: #running-nadeko-on-tmux-if-you-dont-want-to-use-pm2
[Making Nadeko persist upon system restarts (tmux)]: #making-nadeko-persist-upon-system-restarts-tmux-for-advanced-users
[Setting up Nadeko on a VPS (Digital Ocean)]: #setting-up-nadeko-on-a-linux-vps-digital-ocean-droplet

175
docs/guides/osx-guide.md Normal file
View File

@@ -0,0 +1,175 @@
## Setting Up NadekoBot on OSX (macOS)
| Table of Contents |
| :------------------------------------------------------ |
| [Prerequisites] |
| [Installing Homebrew] |
| [Downloading and Running Nadeko] |
| [Running Nadeko with the Terminal closed] |
| [Using Nadeko with pm2 (easiest method)] |
| [Using Nadeko with tmux (if you don't want to use pm2)] |
| [Doing a clean reinstall] |
#### Prerequisites
- OSX 10.12 (Sierra) or higher (needed for .NET Core 2.x).
- [Homebrew](http://brew.sh/).
- [Create a Discord Bot application](../../create-invite/#creating-discord-bot-application) and [invite the bot to your server](../../create-invite/#inviting-your-bot-to-your-server).
#### Installing Homebrew
- Open Terminal (if you don't know how to, click on the magnifying glass on the top right corner of your screen and type **Terminal** on the window that pops up).
- Copy and paste this command, then press Enter:
`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
#### Installing the prerequisites
Run this command in Terminal (copy-paste the entire block):
``` bash
brew install wget git ffmpeg openssl opus opus-tools opusfile libffi libsodium tmux python youtube-dl redis npm
brew services start redis
npm install pm2@3.1.3 -g
```
**Installing .net SDK**
- Download [.net5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0)
- Open the `.pkg` file you've downloaded and install it.
- Run this command in Terminal. There might be output. If there is, disregard it. (copy-paste the entire block)
```bash
sudo mkdir /usr/local/bin
sudo mkdir /usr/local/lib
```
- Run this command in Terminal. There won't be any output. (copy-paste the entire block):
```bash
sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin
sudo ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
sudo ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
```
#### Downloading and Running Nadeko
- Use the following command to download and run the installer. (PS: **Do not** rename the **`linuxAIO.sh`** file)
`cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.9/linuxAIO.sh && bash linuxAIO.sh`
- Choose Option `1` to download Nadeko. Once installation is completed you should see the options again.
- Choose Option `5` to set up your credentials according to this [guide](../../jsons-explained/#setting-up-credentialsjson-file), or find and edit the `credentials.json` file manually.
- Choose Option `2` to **Run Nadeko (Normally)**.
- Check in your Discord server if your new bot is working properly. Once you're done testing, type `.die` on Discord to shut it down. The Terminal should automatically return to the main menu.
#### Running NadekoBot with the terminal closed
If you run Nadeko through option 2 or 3 and close the terminal, Nadeko will also close. To avoid this, you'll need to use a process manager that will keep it open and running in the background. This section of the guide instructs on how to achieve this with pm2 and tmux. Whether you pick one or the other, please **do not** simultaneously, or you're going to get double responses to every command.
#### Using Nadeko with pm2 (easiest method)
- pm2 will not only allow Nadeko to run in the background, but will also automatically launch Nadeko upon system reboots.
- Open the installer, if you haven't already:
`cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.9/linuxAIO.sh && bash linuxAIO.sh`
- Run Option `7` (ignore Option `6`, that's for Linux only).
- Pick whether you want to run it with or without auto-restart and auto-update.
- Once it's done, run Option `8` to exit.
- That's it. Your bot should be running in the background. Feel free to close the Terminal window.
**Managing Nadeko with pm2**
- Use the following commands on Terminal to check your Nadeko setup:
- `pm2 status` to see all pm2 processes
- `pm2 info Nadeko` to see information about Nadeko
- `pm2 logs Nadeko` to view real-time logs of Nadeko, or
- `pm2 logs Nadeko --lines number` (**number** = how many lines you want to output) to see a specific amount of lines of the log. The logfile is also stored and presented at the top of these commands
**Updating Nadeko with pm2**
- If you have set up Nadeko with auto-update, simply run `.die` on your Discord server. That's it.
- If you have set up Nadeko with no auto-update:
- Shut your bot down with `pm2 stop Nadeko`
- Open the installer with `bash linuxAIO.sh` and choose Option `1`
- Once it's done, exit the installer with Option `8` and run `pm2 restart Nadeko`
- You can watch your bot going online with `pm2 logs Nadeko`
#### Using Nadeko with tmux (if you don't want to use pm2)
- On the Terminal, create a new session:
- `tmux new -s nadeko`
The above command will create a new session named **nadeko** *(you can replace “nadeko” with anything you prefer, it's your session name)*.
- Run the installer: `bash linuxAIO.sh`
- Choose `2` to **Run NadekoBot normally**.
- **NOTE**: With this option, if you use `.die` on Discord, the bot will shut down and stay offline until you manually run it again.
- Choose `3` to **Run NadekoBot with Auto Restart**.
- **NOTE**: With this option, the bot will auto run if you use `.die`, making it function as a restart.
If you pick Option `3`, you will be shown the following options:
```
1. Run Auto Restart normally without Updating.
2. Run Auto Restart and update NadekoBot.
3. Exit
```
- With Option `1`, the bot will restart on `.die` command and will not download the latest build available.
- With Option `2`, the bot will restart and download the latest build available everytime the `.die` command is used.
Now check your Discord server, the bot should be online.
- To move the bot to the background, press **Control+B**, release the keys then hit **D**. That will detach the session, allowing you to finally close the terminal window and not worry about having your bot shut down in the process.
**Updating Nadeko with tmux**
- If you're running Nadeko with auto-update, just type `.die` in your Discord server. That's it!
- If you're running Nadeko with **no** auto-update:
- Kill your previous session.
- Check the session name with `tmux ls`
- Kill with `tmux kill-session -t nadeko` (don't forget to replace "nadeko" with whatever you named your bot's session).
- Create a new session: `tmux new -s nadeko`
- Run this command: `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.9/linuxAIO.sh && bash linuxAIO.sh`
- Choose Option `1` to download the most up to date version of Nadeko.
- Once it's done, choose Option `2` or `3` and detach the session by pressing **Control+B**, release then **D**.
**Additional Information**
- If you want to **see the active sessions**, run `tmux ls`. That will give you the list of the currently running sessions.
- If you want to **switch to/see a specific session**, type `tmux a -t nadeko` (*nadeko* is the name of the session we created before so, replace it with the session name you have created).
- If you want to go through the log, press **Control+B**, release the keys then hit **Page Up** or **Page Down** to navigate.
- Don't forget to always detach from the session by pressing **Control+B** then **D** once you're done.
- If you want **create** a new session, run `tmux new -s nadeko`. If you want to **kill it**, run `tmux kill-session -t nadeko`
#### Doing a clean reinstall
- Make a backup of your credentials (`~/NadekoBot/src/NadekoBot/credentials.json`)
- Make a backup of the database (`~/NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data/NadekoBot.db`)
- Make a backup of the images (`~/NadekoBot/src/NadekoBot/data/images.json`)
- Delete the NadekoBot folder
- Install the bot from scratch, replace the files you backed up and run.
#### Help! My music isn't working!
Make sure you have the [Google API Key](../../jsons-explained/#setting-up-your-api-keys) in your `credentials.json`
If music still isn't working, try reinstalling ffmpeg:
- `brew update && brew upgrade` (Update formulae and Homebrew itself && Install newer versions of outdated packages)
- `brew prune` (Remove dead symlinks from Homebrew’s prefix)
- `brew doctor` (Check your Homebrew installation for common issues)
- Then try `brew install ffmpeg` again.
[Prerequisites]: #prerequisites
[Installing Homebrew]: #installing-homebrew
[Downloading and Running Nadeko]: #downloading-and-running-nadeko
[Running Nadeko with the Terminal closed]: #running-nadekobot-with-the-terminal-closed
[Using Nadeko with pm2 (easiest method)]: #using-nadeko-with-pm2-easiest-method
[Using Nadeko with tmux (if you don't want to use pm2)]: #using-nadeko-with-tmux-if-you-dont-want-to-use-pm2
[Doing a clean reinstall]: #doing-a-clean-reinstall

View File

@@ -0,0 +1,72 @@
## Setting Up NadekoBot on Windows With the Updater
| Table of Contents|
| :---------------------------------------------------------------------------------------------------------------------------|
| [Prerequisites](#prerequisites) |
| [Setup](#setup) |
| [Starting the Bot](#starting-the-bot) |
| [Updating Nadeko](#updating-nadeko) |
| [Manually Installing the Prerequisites from the Updater](#if-the-updater-fails-to-install-the-prerequisites-for-any-reason) |
*Note: If you want to make changes to Nadeko's source code, please follow the [From Source][SourceGuide] guide instead.*
*If you have Windows 7 or a 32-bit system, please refer to the [From Source][SourceGuide] guide.*
#### Prerequisites
- Windows 8 or later (64-bit)
- [Create a Discord Bot application](../../create-invite#creating-discord-bot-application) and [invite the bot to your server](../../create-invite/#inviting-your-bot-to-your-server).
**Optional**
- [Notepad++] (makes it easier to edit your credentials)
- [Visual C++ 2010 (x86)] and [Visual C++ 2017 (x64)] (both are required if you want Nadeko to play music - restart Windows after installation)
#### Setup
- Download and run the [NadekoBot Updater][Updater].
- Click on the + at the top left to create a new bot.
![NadekoBot Updater](https://i.imgur.com/KZV49uf.png "NadekoBot Updater")
- Give your bot a name and then click **`Go to setup`** at the lower right.
![Create a new bot](https://i.imgur.com/Xnp7iQL.png "Create a new bot")
- Click on **`DOWNLOAD`** at the lower right
![Bot Setup](https://i.imgur.com/6RMXNqw.png "Bot Setup")
- Click on **`Install`** next to **`Redis`**.
- 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.
#### Starting the bot
- Either click on **`RUN`** button in the updater or run the bot via its desktop shortcut.
#### Updating Nadeko
- Make sure Nadeko is closed and not running
(Run `.die` in a connected server to ensure it's not running).
- Open NadekoBot Updater
- Click on your bot at the upper left (looks like a spy).
- Click on **`Check for updates`**.
- If updates are available, you will be able to click on the Update button.
- Launch the bot
- You've updated and are running again, easy as that!
#### Manual Prerequisite Installation
You can still install them manually:
- [Redis Installer](https://github.com/MicrosoftArchive/redis/releases/tag/win-3.0.504) - Download and run the **`.msi`** file
- [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/system
- [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
[Updater]: https://dl.nadeko.bot/
[Notepad++]: https://notepad-plus-plus.org/
[.net]: https://dotnet.microsoft.com/download/dotnet/5.0
[Redis]: https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi
[Visual C++ 2010 (x86)]: https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
[Visual C++ 2017 (x64)]: https://aka.ms/vs/15/release/vc_redist.x64.exe
[SourceGuide]: ../from-source
[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

43
docs/index.md Normal file
View File

@@ -0,0 +1,43 @@
# NadekoBot Documentation
<!-- ![img][header] -->
## Inviting Nadeko
There are two versions of Nadeko, a public bot and a self-hostable bot.
To invite public Nadeko to your server or to view its commands, click on the buttons below:
[:material-plus: Add Nadeko to your server][invite]{ .md-button .md-button--primary }
[:material-format-list-text: View commands][commands]{ .md-button }
To self-host your own Nadeko, use the guides below:
- [:material-microsoft-windows: Windows guide][windows-guide]
- [:material-linux: Linux guide][linux-guide]
- [:material-apple: Mac OS guide][macos-guide]
Alternatively, you may also setup the bot [from source][from-source-guide] if you want to modify the code.
In case you need any help, join our [Discord server][discord-server] where we may provide support.
---
## About Nadeko
NadekoBot is an [open source project][gitlab]. Any issues with the bot may be filed [here][issues].
If you're unsure whether something is an issue, ask in our support server first.
[Donations are welcome][donate], and we rely on your contributions to help keep the project alive.
[invite]: https://invite.nadeko.bot/
[commands]: https://nadeko.bot/commands/
[windows-guide]: ./guides/windows-guide.md
[linux-guide]: ./guides/linux-guide.md
[macos-guide]: ./guides/osx-guide.md
[from-source-guide]: ./guides/from-source.md
[discord-server]: https://discord.nadeko.bot/
[gitlab]: https://gitlab.com/Kwoth/nadekobot
[issues]: https://gitlab.com/Kwoth/nadekobot/issues
[donate]: ./donate.md

221
docs/jsons-explained.md Normal file
View File

@@ -0,0 +1,221 @@
## 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**.
- **GoogleAPIKey**
- Required for Youtube Song Search, Playlist queuing, and a few more things.
- 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`**,
- 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.
- It should look like this:
```json
"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`
- **OsuApiKey**
- Required for Osu commands
- You can get this key [here](https://osu.ppy.sh/p/api).
- **CleverbotApiKey**
- Required if you want to use Cleverbot. It's currently a paid service.
- You can get this key [here](http://www.cleverbot.com/api/).
- **PatreonAccessToken**
- For Patreon creators only.
- **PatreonCampaignId**
- For Patreon creators only. Id of your campaign.
- **TwitchClientId**
- Mandatory for following twitch streams with `.twitch` (or `.stadd` with twitch link)
- Go to [apps page](https://dev.twitch.tv/console/apps/create) on twitch and register your application.
- You need 2FA enabled on twitch in order to create an application
- 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",
```
- **LocationIqApiKey**
- Optional. Used only for the `.time` command. https://locationiq.com api key (register and you will receive the token in the email).
- **TimezoneDbApiKey**
- Optional. Used only for the `.time` command. https://timezonedb.com api key (register and you will receive the token in the email **YOU HAVE TO ACTIVEATE IT AFTER YOU GET IT**).
- **CoinmarketcapApiKey**
- Optional. Used only for the `.crypto` command. You can use crypto command without it, but you might get ratelimited from time to time, as all self-hosters share the default api key. https://pro.coinmarketcap.com/
##### Additional Settings
- **TotalShards**
- Required if the bot will be connected to more than 2500 servers.
- Most likely unnecessary to change until your bot is added to more than 2500 servers.
- **RedisOptions**
- Required if the Redis instance is not on localhost or on non-default port.
- You can find all available options [here](https://stackexchange.github.io/StackExchange.Redis/Configuration.html).
- **RestartCommand**
- 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`
```json
"RestartCommand": {
"Cmd": "NadekoBot.exe"
},
```
For Windows (Source), Linux or OSX, add this to your `credentials.json`
```json
"RestartCommand": {
"Cmd": "dotnet",
"Args": "run -c Release"
},
```
---
#### 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):**
```json
{
"Token": "MTc5MzcyXXX2MDI1ODY3MjY0.ChKs4g.I8J_R9XX0t-QY-0PzXXXiN0-7vo",
"OwnerIds": [
105635123466156544,
145521851676884992,
341420590009417729
],
"GoogleApiKey": "AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM",
"MashapeKey": "4UrKpcWXc2mshS8RKi00000y8Kf5p1Q8kI6jsn32bmd8oVWiY7",
"OsuApiKey": "4c8c8fdff8e1234581725db27fd140a7d93320d6",
"CleverbotApiKey": "",
"Db": null,
"TotalShards": 1,
"PatreonAccessToken": "",
"PatreonCampaignId": "334038",
"RestartCommand": {
"Cmd": "NadekoBot.exe"
},
"ShardRunCommand": "",
"ShardRunArguments": "",
"ShardRunPort": null,
"TwitchClientId": null,
"RedisOptions": null
}
```
---
## Database
Nadeko saves all settings and data in the database file `NadekoBot.db`, located in:
- Windows (Updater): `system/data` (can be easily accessed through the `Data` button on the updater)
- Windows (Source), Linux and OSX: `NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.1/data/NadekoBot.db`
In order to open it you will need [SQLite Browser](http://sqlitebrowser.org/).
*NOTE: You don't have to worry if you don't have the `NadekoBot.db` file, it gets automatically created once you successfully run the bot for the first time.*
**To make changes:**
- Shut your bot down.
- Copy the `NadekoBot.db` file to someplace safe. (Back up)
- Open it with SQLite Browser.
- Go to the **Browse Data** tab.
- Click on the **Table** drop-down list.
- Choose the table you want to edit.
- Click on the cell you want to edit.
- Edit it on the right-hand side.
- Click on **Apply**.
- Click on **Write Changes**.
![nadekodb](https://cdn.discordapp.com/attachments/251504306010849280/254067055240806400/nadekodb.gif)
---
## Sharding your bot
- **ShardRunCommand**
- Command with which to run shards 1+
- Required if you're sharding your bot on windows using .exe, or in a custom way.
- This internally defaults to `dotnet`
- For example, if you want to shard your NadekoBot which you installed using windows installer, you would want to set it to something like this: `C:\Program Files\NadekoBot\system\NadekoBot.exe`
- **ShardRunArguments**
- Arguments to the shard run command
- Required if you're sharding your bot on windows using .exe, or in a custom way.
- This internally defaults to `run -c Release --no-build -- {0} {1} {2}` which will be enough to run linux and other 'from source' setups
- {0} will be replaced by the `shard ID` of the shard being ran, {1} by the shard 0's process id, and {2} by the port shard communication is happening on
- If shard0 (main window) is closed, all other shards will close too
- For example, if you want to shard your NadekoBot which you installed using windows installer, you would want to set it to `{0} {1} {2}`
- **ShardRunPort**
- Bot uses a random UDP port in [5000, 6000] range for communication between shards
[Google Console]: https://console.developers.google.com
[DiscordApp]: https://discordapp.com/developers/applications/me
[Invite Guide]: https://tukimoop.pw/s/guide.html

9
docs/license.md Normal file
View File

@@ -0,0 +1,9 @@
# License
Copyright 2021 Kwoth
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,9 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0071 23.007L16.4231 9.41602H7.59106L12.0071 23.007Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.007 23.007L7.59101 9.41602H1.4021L12.007 23.007Z" fill="white" fill-opacity="0.66"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.40214 9.41602L0.0601964 13.5462C-0.0622036 13.9229 0.0718535 14.3356 0.39231 14.5684L12.007 23.007L1.40214 9.41602Z" fill="white" fill-opacity="0.33"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.4021 9.41592H7.59101L4.93124 1.23021C4.79444 0.80895 4.19856 0.809064 4.06176 1.23021L1.4021 9.41592Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0071 23.007L16.4231 9.41602H22.612L12.0071 23.007Z" fill="white" fill-opacity="0.66"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.612 9.41602L23.9539 13.5462C24.0763 13.9229 23.9423 14.3356 23.6218 14.5684L12.0071 23.007L22.612 9.41602Z" fill="white" fill-opacity="0.33"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.612 9.41592H16.4231L19.0829 1.23021C19.2197 0.80895 19.8156 0.809064 19.9524 1.23021L22.612 9.41592Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,94 @@
# Permissions Overview
Have you ever felt confused or even overwhelmed when trying to set Nadeko's permissions? In this guide we will be explaining **how to use the permission commands correctly** and even **cover a few common questions**! Every command we discuss here can be found in the [Commands List].
## 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.
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.
With the permissions system it possible to restrict who can skip the current song, pick NadekoFlowers or use the NSFW module.
## First Time Setup
To change permissions you **must** meet the following requirements:
**Have Administrator Server Permission.**
**If you are NOT the server owner or an admin, get the role set to `.permrole` (there is no permission role by default).**
## Basics & Hierarchy
The [Commands List] is a great tool which lists **all** available commands, however we'll go over a few of them here.
First, let's explain how the permissions system works - It's simple once you figure out how each command works!
The permissions system works as a chain. Everytime a command is used, the permissions chain is checked. Starting from the top of it, the command is compared to a rule, if it isn't either allowed or disallowed by that rule it proceeds to check the next rule all the way till it reaches the bottom rule, which allows all commands.
To view this permissions chain, do `.lp`. The rule at the top of the chain takes priority over all rules below it.
If you want to remove a permission from the chain of permissions, do `.rp X` to remove rule number X and similarly, do `.mp X Y` to move rule number X to number Y (moving, not swapping!).
If you want the bot to notify users why they can't use a command or module, use `.verbose true` and Nadeko will tell you what rule is preventing the command from being used.
## Commonly Asked Questions
#### How do I restrict all commands to a single channel?
To allow users to only use commands in a specific text channel, follow these steps:
1. `.asm disable`
- Disables all modules on the entire server
2. `.acm enable #bot-spammerino`
- Enables all modules in the #bot-spammerino channel
#### How do I allow only one module to be used in a specific channel?
To allow users to only use commands from a certain module, let's say **gambling**, in a specific text channel, follow these steps:
1. `.acm disable #gamblers-den`
- Disables all modules in the #gamblers-den channel
2. `.cm Gambling enable #gamblers-den`
- Enables usage of the Gambling module in the #gamblers-den channel
#### How do I create a music DJ?
To allow users to only see the current song and have a DJ role for queuing follow these steps:
1. `.sm Music disable`
- Disables music commands for everybody
2. `.sc .nowplaying enable`
- Enables the "nowplaying" command for everyone
3. `.sc .listqueue enable`
- Enables the "listqueue" command for everyone
4. `.rm Music enable DJ`
- Enables all music commands only for the DJ role
#### How do I create a NSFW role?
Say you want to only enable NSFW commands for a specific role, just do the following two steps.
1. `.sm NSFW disable`
- Disables the NSFW module from being used
2. `.rm NSFW enable Lewd`
- Enables usage of the NSFW module for the Lewd role
#### How do I disable custom reactions from triggering?
If you don't want server or global custom reactions, just block the module that controls their usage:
1. `.sm ActualCustomReactions disable`
- Disables the ActualCustomReactions module from being used
**Note**: The `ActualCustomReactions` module controls the usage of custom reactions. The `CustomReactions` module controls commands related to custom reactions (such as `.acr`, `.lcr`, `.crca`, etc).
#### I've broken permissions and am stuck, can I reset permissions?
Yes, there is a way, in one easy command!
1. `.resetperms`
- This resets the permission chain back to default
*-- Thanks to @applemac for providing the template for this guide*
[Commands List]: https://nadeko.bot/commands

94
docs/placeholders.md Normal file
View File

@@ -0,0 +1,94 @@
# Placeholders
Placeholders are used in Quotes, Custom Reactions, Greet/Bye messages, playing statuses, and a few other places.
They can be used to make the message more user friendly, generate random numbers or pictures, etc.
Some features have their own specific placeholders which are noted in that feature's command help. Some placeholders are not available in certain features because they don't make sense there.
## Usual placeholders
!!! Note
If you're using placeholders in embeds, don't use %user.mention% and %bot.mention% in titles, footers and field names. They will not show properly.
### Bot placeholders
- `%bot.status%` - Bot's status (Online, Idle, DoNotDisturb, Invisible)
- `%bot.latency%` - Bot latency
- `%bot.name%` - Bot username
- `%bot.mention%` - Bot mention (clickable)
- `%bot.fullname%` - Bot username#discriminator
- `%bot.time%` - Bot time (usually the time of the server it's hosted on)
- `%bot.discrim%` - Bot's discriminator
- `%bot.id%` - Bot's user ID
- `%bot.avatar%` - Bot's avatar url
### Server placeholders
- `%server.id%` - Server ID
- `%server.name%` - Server name
- `%server.members%` - Member count
- `%server.time%` - Server time (requires `.timezone` to be set)
### Channel placeholders
- `%channel.mention%` - Channel mention (clickable)
- `%channel.name%` - Channel name
- `%channel.id%` - Channel ID
- `%channel.created%` - Channel creation date
- `%channel.nsfw%` - Returns either `True` or `False`, depending on if the channel is designated as NSFW using discord
- `%channel.topic%` - Channel topic
### User placeholders
- `%user.mention%` - User mention
- `%user.fullname%` - Username#discriminator
- `%user.name%` - Username
- `%user.discrim%` - Discriminator
- `%user.avatar%` - User's avatar url
- `%user.id%` - User ID
- `%user.created_time%` - Account creation time (local time)
- `%user.created_date%` - Account creation date
- `%user.joined_time%` - Account join time (local time)
- `%user.joined_date%` - Account join date
### Ban message placeholders
- `%ban.mod%` - Full name of the moderator who performed the ban
- `%ban.mod.fullname%` - Full name of the moderator who performed the ban
- `%ban.mod.mention%` - Moderator's mention
- `%ban.mod.name%` - Name of the moderator - Admin
- `%ban.mod.discrim%` - Discriminator of the moderator - 1234
- `%ban.user%` - Full name of the banned user
- `%ban.user.fullname%` - Full name of the banned user
- `%ban.user.name%` - Name of the banned user
- `%ban.user.discrim%` - Discriminator of the banned user
- `%ban.reason%` - Reason for the ban, if provided
- `%ban.duration%` - Duration of the ban in the form Days.Hours:Minutes (6.05:04)
### Bot stats placeholders
- `%servers%` - Server count bot has joined
- `%users%` - Combined user count on servers the bot has joined
### Shard stats placeholders
- `%shard.servercount%` - Server count on current shard
- `%shard.usercount%` - Combined user count on current shard
- `%shard.id%` - Shard ID
### Music placeholders
!!! Note
These placeholders will only work in rotating playing statuses.
- `%music.queued%` - Amount of songs currently queued
- `%music.playing%` - Current song name
### Miscellaneous placeholders
- `%rngX-Y%` - Returns a random number between X and Y
- `%target%` - Returns anything the user has written after the trigger (only works on custom reactions)
- `%img:stuff%` - Returns an `imgur.com` search for "stuff" (only works on custom reactions)
![img](https://puu.sh/B7mgI.png)

View File

@@ -0,0 +1,122 @@
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap');
/* general styling changes */
.md-typeset * {
letter-spacing: 0 !important;
}
.md-header__topic {
font-family: 'Noto Sans';
font-weight: 700 !important;
}
label[for="__toc"] {
text-transform: uppercase;
}
@media screen and (min-width: 76.25em) {
label[for="__drawer"] {
text-transform: uppercase;
}
}
.md-source__facts {
margin-top: 4px;
}
.md-source__fact {
display: inline-flex;
align-items: center;
}
@media screen and (max-width: 76.1875em) {
label[for="__drawer"] {
font-family: 'Noto Sans';
font-weight: 700 !important;
}
}
.md-typeset h1, h2, h3, h4, h5, h6 {
font-weight: 600 !important;
color: var(--md-default-fg-color);
width: 87%;
}
.md-header__title, .md-header__nav-title {
margin-left: 8px !important;
}
.md-search__form input {
padding-left: 44px;
font-size: 16px;
}
.md-search__form .md-search__icon {
display: flex;
place-items: center;
}
.md-search__form .md-search__icon svg {
height: 20px;
width: 20px;
}
.md-button {
border-radius: 4px !important;
}
.md-button:hover {
filter: brightness(110%);
}
.md-button:active {
transform: translateY(1px);
}
.md-button {
display: inline-flex !important;
place-items: center !important;
font-weight: 500 !important;
margin-right: 8px;
margin-bottom: 8px;
}
.md-button span {
height: auto !important;
}
.md-button span svg {
height: 24px;
width: 24px;
margin: 0px 8px;
}
.color--primary {
color: var(--md-primary-fg-color) !important;
}
.color--accent {
color: var(--md-accent-fg-color) !important;
}
.md-header {
box-shadow: none !important;
}
.md-main__inner {
margin-top: 0.5rem;
}
hr+h1, hr+h2, hr+h3, hr+h4, hr+h5, hr+h6 {
margin-top: 0px !important;
}
.md-sidebar {
top: 0px !important;
}
.admonition * {
font-size: .75rem;
}

View File

@@ -0,0 +1,54 @@
[data-md-color-scheme="dark"] {
--md-default-fg-color: hsl(220, 10%, 100%);
--md-default-fg-color--light: hsl(220, 10%, 87%);
--md-default-fg-color--lighter: hsl(220, 10%, 54%);
--md-default-fg-color--lightest: hsl(220, 10%, 32%);
--md-default-bg-color: hsl(220, 10%, 20%);
--md-default-bg-color--light: hsl(220, 10%, 16%);
--md-default-bg-color--lighter: hsl(220, 10%, 12%);
--md-default-bg-color--lightest: hsl(220, 10%, 8%);
--md-code-fg-color: hsla(220, 10%, 86%, 1);
--md-code-bg-color: hsla(220, 10%, 15%, 1);
--md-code-hl-color: #448aff;
--md-code-hl-number-color: #e6695b;
--md-code-hl-special-color: #f06090;
--md-code-hl-function-color: #c973d9;
--md-code-hl-constant-color: #9383e2;
--md-code-hl-keyword-color: #6791e0;
--md-code-hl-string-color: #2fb170;
--md-code-hl-name-color: var(--md-code-fg-color);
--md-code-hl-operator-color: var(--md-default-fg-color--light);
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
--md-code-hl-comment-color: var(--md-default-fg-color--light);
--md-code-hl-generic-color: var(--md-default-fg-color--light);
--md-code-hl-variable-color: var(--md-default-fg-color--light);
--md-typeset-color: var(--md-default-fg-color);
--md-typeset-a-color: var(--md-primary-fg-color);
--md-typeset-mark-color: #448aff;
--md-typeset-kbd-color: hsla(220, 10%, 94%, 0.12);
--md-typeset-kbd-accent-color: hsla(220, 10%, 94%, 0.2);
--md-typeset-kbd-border-color: hsla(220, 10%, 14%, 1);
--md-admonition-bg-color: hsla(220, 10%, 100%, 0.025);
--md-footer-bg-color: hsl(220, 10%, 16%);
--md-footer-bg-color--dark: hsl(220, 10%, 12%);
}
[data-md-color-scheme="dark"] .md-typeset {
color: var(--md-default-fg-color--light);
}
[data-md-color-scheme="dark"][data-md-color-primary="black"], [data-md-color-scheme="dark"][data-md-color-primary="white"] {
--md-typeset-a-color: var(--md-accent-fg-color);
}
[data-md-color-scheme="dark"] .md-header {
background: var(--md-default-bg-color--light);
}
[data-md-color-scheme="dark"] .md-nav__item :not(.md-nav__link--active) {
color: var(--md-default-fg-color--light);
}
[data-md-color-scheme="dark"] .md-nav__item .md-nav__link:hover {
color: var(--md-primary-fg-color);
}