mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Compare commits
29 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
804d3f79fd | ||
|
fb119cca4c | ||
|
31af5ea8c2 | ||
|
e1776d6093 | ||
|
33dd4bbf0e | ||
|
af343ac1f0 | ||
|
065807c180 | ||
|
9cd24feccc | ||
|
a2d1506915 | ||
|
54a32a5770 | ||
|
5b9abeb0b2 | ||
|
accfb2d1ac | ||
|
71d383c4db | ||
|
197ee9f5ff | ||
|
d51d159962 | ||
|
89b0eabd41 | ||
|
8d932d546a | ||
|
9ea3460e3d | ||
|
7bd4db60a8 | ||
|
42e1f35df2 | ||
|
179784da3e | ||
|
9ed0c870d1 | ||
|
77e288ee54 | ||
|
58adaa9110 | ||
|
d3a73945e7 | ||
|
caca407abd | ||
|
4fd7b2d8cd | ||
|
eaea6e3c54 | ||
|
0bb68c7723 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -2,9 +2,16 @@
|
||||
|
||||
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
|
||||
|
||||
## Unreleased
|
||||
## [3.0.12] = 06.01.2021
|
||||
|
||||
-
|
||||
### Fixed
|
||||
- `.smch` Fixed
|
||||
- `.trans` command will now work properly with capitilized language names
|
||||
- Ban message color with plain text fixed
|
||||
- Fixed some grpc coordinator bugs
|
||||
- Fixed a string in `.xpex`
|
||||
- Google version of .img will now have safe search enabled
|
||||
- Fixed a small bug in `.hangman`
|
||||
|
||||
## [3.0.11] - 17.12.2021
|
||||
|
||||
|
@@ -13,8 +13,13 @@ This document aims to guide you through the process of creating a Discord accoun
|
||||
- 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.
|
||||
- Copy your Token to `creds.yml` as shown above.
|
||||
- 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.
|
||||
- Scroll down to the `Privileged Gateway Intents` section
|
||||
- Enabled the following:
|
||||
- PRESENCE INTENT
|
||||
- SERVER MEMBERS INTENT
|
||||
- MESSAGE CONTENT INTENT
|
||||
|
||||
These are required for a number of features to function properly, and all should be on.
|
||||
|
||||
##### Getting Owner ID*(s)*:
|
||||
|
||||
@@ -32,7 +37,7 @@ For a single owner, it should look like this:
|
||||
- 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):
|
||||
For multiple owners, it should look like this:
|
||||
|
||||
```yml
|
||||
OwnerIds:
|
||||
|
@@ -13,11 +13,11 @@ Open Terminal (if you're on an installation with a window manager) and navigate
|
||||
1. Download and run the **new** installer script `cd ~ && wget -N https://gitlab.com/Kwoth/nadeko-bash-installer/-/raw/master/linuxAIO.sh && bash linuxAIO.sh`
|
||||
2. Install prerequisites (type `1` and press enter)
|
||||
3. Download the bot (type `2` and press enter)
|
||||
4. Exit the installer in order to set up your `creds.yml`
|
||||
4. Exit the installer (type `5` and press enter)
|
||||
5. Copy the creds.yml template `cp nadekobot/output/creds_example.yml nadekobot/output/creds.yml`
|
||||
6. Open `nadekobot/output/creds.yml` with your favorite text editor. We will use nano here
|
||||
- `nano nadekobot/output/creds.yml`
|
||||
7. [Enter your bot's token](../../creds-guide)
|
||||
7. [Click here to follow creds guide](../../creds-guide)
|
||||
- After you're done, you can close nano (and save the file) by inputting, in order
|
||||
- `CTRL` + `X`
|
||||
- `Y`
|
||||
@@ -49,7 +49,7 @@ Open Terminal (if you're on an installation with a window manager) and navigate
|
||||
- `cp creds_example.yml creds.yml`
|
||||
6. Open `creds.yml` with your favorite text editor. We will use nano here
|
||||
- `nano nadekobot/output/creds.yml`
|
||||
8. [Enter your bot's token](../../creds-guide)
|
||||
8. [Click here to follow creds guide](../../creds-guide)
|
||||
- After you're done, you can close nano (and save the file) by inputting, in order
|
||||
- `CTRL` + `X`
|
||||
- `Y`
|
||||
@@ -244,3 +244,34 @@ This method is similar to the one above, but requires one extra step, with the a
|
||||
|
||||
5. Start Nadeko:
|
||||
- `sudo systemctl start nadeko.service && sudo systemctl enable nadeko.service`
|
||||
|
||||
### 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](../../creds-guide).
|
||||
|
||||
#### 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](#linux-from-source) to set Nadeko up on your newly created VPS.
|
||||
|
@@ -12,11 +12,11 @@
|
||||
| [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) |
|
||||
| [Manually Installing the Prerequisites from the Updater](#music-prerequisites) |
|
||||
|
||||
*Note: If you want to make changes to Nadeko's source code, please follow the [From Source][SourceGuide] guide instead.*
|
||||
*Note: If you want to make changes to Nadeko's source code, please follow the [From Source](#windows-from-source) guide instead.*
|
||||
|
||||
*If you have Windows 7 or a 32-bit system, please refer to the [From Source][SourceGuide] guide.*
|
||||
*If you have Windows 7 or a 32-bit system, please refer to the [From Source](#windows-from-source)) guide.*
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
- Click on **`DOWNLOAD`** at the lower right
|
||||

|
||||
- Click on **`Install`** next to **`Redis`**.
|
||||
- **Note: If Redis fails to install, install Redis manually here: [Redis Installer](https://github.com/MicrosoftArchive/redis/releases/tag/win-3.0.504) Download and run the **`.msi`** file.
|
||||
- Note: If Redis fails to install, install Redis manually here: [Redis Installer](https://github.com/MicrosoftArchive/redis/releases/tag/win-3.0.504) Download and run the **`.msi`** file.
|
||||
- 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.
|
||||
@@ -83,8 +83,8 @@ Open PowerShell (press windows button on your keyboard and type powershell, it s
|
||||
1. `git clone https://gitlab.com/kwoth/nadekobot -b v3 --depth 1`
|
||||
2. `cd nadekobot`
|
||||
3. `dotnet publish -c Release -o output/ src/NadekoBot/`
|
||||
4. `cd output'
|
||||
5. 'cp creds_example.yml creds.yml`
|
||||
4. `cd output`
|
||||
5. `cp creds_example.yml creds.yml`
|
||||
6. 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)
|
||||
7. [Enter your bot's token](#creds-guide)
|
||||
8. Run the bot `dotnet NadekoBot.dll`
|
||||
@@ -130,8 +130,6 @@ In order to use music commands, you need ffmpeg and youtube-dl installed.
|
||||
[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
|
||||
|
||||
|
@@ -11,6 +11,9 @@ This part is completely optional, **however it's necessary for music and a few o
|
||||
- Under the `YouTube APIs` section
|
||||
- Select `YouTube Data API v3`,
|
||||
- Click enable.
|
||||
- Search for `Custom Search API`
|
||||
- Select `Custom Search API`,
|
||||
- Click enable.
|
||||
- Open up the `Navigation menu` on the top right with the three lines.
|
||||
- select `APIs & Services`, then select `Credentials`,
|
||||
- Click `Create Credentials` button,
|
||||
@@ -21,7 +24,7 @@ This part is completely optional, **however it's necessary for music and a few o
|
||||
- Open up `creds.yml` and look for `GoogleAPIKey`, paste your API key after the `:`.
|
||||
- It should look like this:
|
||||
```yml
|
||||
GoogleApiKey: "AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM"
|
||||
GoogleApiKey: AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM
|
||||
```
|
||||
- **MashapeKey**
|
||||
- Required for Hearthstone cards.
|
||||
@@ -95,11 +98,10 @@ version: 1
|
||||
token: 'MTE5Nzc3MDIxMzE5NTc3NjEw.VlhNCw.BuqJFyzdIUAK1PRf1eK1Cu89Jew'
|
||||
# List of Ids of the users who have bot owner permissions
|
||||
# **DO NOT ADD PEOPLE YOU DON'T TRUST**
|
||||
ownerIds: [
|
||||
105635123466156544,
|
||||
145521851676884992,
|
||||
341420590009417729
|
||||
]
|
||||
ownerIds:
|
||||
- 105635123466156544
|
||||
- 145521851676884992
|
||||
- 341420590009417729
|
||||
# The number of shards that the bot will running on.
|
||||
# Leave at 1 if you don't know what you're doing.
|
||||
totalShards: 1
|
||||
|
@@ -19,6 +19,9 @@ namespace NadekoBot.Common
|
||||
/// <returns>Task representing download state</returns>
|
||||
public async Task EnsureUsersDownloadedAsync(IGuild guild)
|
||||
{
|
||||
#if GLOBAL_NADEKO
|
||||
return;
|
||||
#endif
|
||||
await downloadUsersSemaphore.WaitAsync();
|
||||
try
|
||||
{
|
||||
|
@@ -105,6 +105,7 @@ namespace NadekoBot.Modules.Games.Hangman
|
||||
return GetState(GuessResult.Win);
|
||||
}
|
||||
|
||||
_correct.Add(charGuess);
|
||||
return GetState(GuessResult.Guess);
|
||||
}
|
||||
|
||||
|
@@ -195,7 +195,7 @@ namespace NadekoBot.Modules.Music.Services
|
||||
public Task<IUserMessage?> SendToOutputAsync(ulong guildId, IEmbedBuilder embed)
|
||||
{
|
||||
if (_outputChannels.TryGetValue(guildId, out var chan))
|
||||
return (chan.Default ?? chan.Override).EmbedAsync(embed);
|
||||
return (chan.Override ?? chan.Default).EmbedAsync(embed);
|
||||
|
||||
return Task.FromResult<IUserMessage?>(null);
|
||||
}
|
||||
|
@@ -109,9 +109,7 @@ namespace NadekoBot.Modules.Utility
|
||||
await _tracker.EnsureUsersDownloadedAsync(ctx.Guild).ConfigureAwait(false);
|
||||
|
||||
var users = await ctx.Guild.GetUsersAsync(
|
||||
#if GLOBAL_NADEKO
|
||||
CacheMode.CacheOnly
|
||||
#endif
|
||||
);
|
||||
var roleUsers = users
|
||||
.Where(u => role is null ? u.RoleIds.Count == 1 : u.RoleIds.Contains(role.Id))
|
||||
|
@@ -250,6 +250,16 @@ namespace NadekoBot.Services
|
||||
rep.Replace(text);
|
||||
try
|
||||
{
|
||||
if (text is SmartPlainText pt)
|
||||
{
|
||||
text = new SmartEmbedText() { PlainText = pt.Text };
|
||||
}
|
||||
|
||||
((SmartEmbedText)text).Footer = new()
|
||||
{
|
||||
Text = $"This message was sent from {user.Guild} server.", IconUrl = user.Guild.IconUrl
|
||||
};
|
||||
|
||||
await channel.SendAsync(text).ConfigureAwait(false);
|
||||
}
|
||||
catch
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Google;
|
||||
using Google;
|
||||
using Google.Apis.Customsearch.v1;
|
||||
using Google.Apis.Services;
|
||||
using Google.Apis.Urlshortener.v1;
|
||||
@@ -220,6 +220,7 @@ namespace NadekoBot.Services
|
||||
req.Fields = "items(image(contextLink,thumbnailLink),link)";
|
||||
req.SearchType = CseResource.ListRequest.SearchTypeEnum.Image;
|
||||
req.Start = new NadekoRandom().Next(0, 20);
|
||||
req.Safe = CseResource.ListRequest.SafeEnum.Active;
|
||||
|
||||
var search = await req.ExecuteAsync().ConfigureAwait(false);
|
||||
|
||||
|
@@ -20,7 +20,7 @@ namespace NadekoBot.Services
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly DateTime _started;
|
||||
|
||||
public const string BotVersion = "3.0.11";
|
||||
public const string BotVersion = "3.0.12";
|
||||
public string Author => "Kwoth#2452";
|
||||
public string Library => "Discord.Net";
|
||||
public double MessagesPerSecond => MessageCounter / GetUptime().TotalSeconds;
|
||||
|
Reference in New Issue
Block a user