Merged v3 branch updates

This commit is contained in:
Kwoth
2021-12-21 23:36:31 +01:00
8 changed files with 31 additions and 25 deletions

View File

@@ -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. [Enter your bot's token](../../creds-guide)
- After you're done, you can close nano (and save the file) by inputting, in order
- `CTRL` + `X`
- `Y`

View File

@@ -83,11 +83,12 @@ 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 && cp creds_example.yml creds.yml`
5. Open `creds.yml` with your favorite text editor (Please don't use Notepad or WordPad. You can use Notepad++, VSCode, Atom, Sublime, or something similar)
6. [Enter your bot's token](#creds-guide)
7. Run the bot `dotnet NadekoBot.dll`
8. 🎉
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`
9. 🎉
##### Update Instructions

View File

@@ -8,8 +8,11 @@ This part is completely optional, **however it's necessary for music and a few o
- 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`,
- Under the `YouTube APIs` section
- Select `YouTube Data API v3`,
- 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,
- Click on `API Key`
- A new window will appear with your `Google API key`

View File

@@ -160,18 +160,24 @@ namespace NadekoBot.Coordinator
private void StartShard(int shardId)
{
var status = _shardStatuses[shardId];
if (status.Process is {HasExited: false} p)
try
{
try
if (status.Process is { HasExited: false } p)
{
p.Kill(true);
try
{
p.Kill(true);
}
catch
{
}
}
catch
{
}
}
try { status.Process?.Dispose(); } catch { }
status.Process?.Dispose();
}
catch
{
}
var proc = StartShardProcess(shardId);
_shardStatuses[shardId] = status with

View File

@@ -487,7 +487,7 @@ WHERE GuildId={guildId}
{
template = JsonConvert.SerializeObject(new
{
color = _bcs.Data.Color.Error,
color = _bcs.Data.Color.Error.PackedValue >> 8,
description = defaultMessage
});
}
@@ -502,7 +502,7 @@ WHERE GuildId={guildId}
{
template = JsonConvert.SerializeObject(new
{
color = _bcs.Data.Color.Error,
color = _bcs.Data.Color.Error.PackedValue >> 8,
description = template
});
}

View File

@@ -166,10 +166,6 @@ public class XpService : INService
{
var xp = item.Sum(x => x.XpAmount);
//1. Mass query discord users and userxpstats and get them from local dict
//2. (better but much harder) Move everything to the database, and get old and new xp
// amounts for every user (in order to give rewards)
var usr = uow.GetOrCreateUserXpStats(item.Key.GuildId, item.Key.User.Id);
var du = uow.GetOrCreateUser(item.Key.User);

View File

@@ -270,7 +270,7 @@ public partial class Xp : NadekoModule<XpService>
}
else
{
await ReplyConfirmLocalizedAsync(strs.excluded(Format.Bold(channel.ToString())));
await ReplyConfirmLocalizedAsync(strs.not_excluded(Format.Bold(channel.ToString())));
}
}

View File

@@ -1143,9 +1143,9 @@ butts:
args:
- ""
translate:
desc: "Translates from>to text. From the given language to the destination language."
desc: "Translates text from the given language to the destination language."
args:
- "en>fr Hello"
- "en fr Hello"
translangs:
desc: "Lists the valid languages for translation."
args: