mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Merged v3 branch updates
This commit is contained in:
@@ -49,7 +49,7 @@ Open Terminal (if you're on an installation with a window manager) and navigate
|
|||||||
- `cp creds_example.yml creds.yml`
|
- `cp creds_example.yml creds.yml`
|
||||||
6. Open `creds.yml` with your favorite text editor. We will use nano here
|
6. Open `creds.yml` with your favorite text editor. We will use nano here
|
||||||
- `nano nadekobot/output/creds.yml`
|
- `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
|
- After you're done, you can close nano (and save the file) by inputting, in order
|
||||||
- `CTRL` + `X`
|
- `CTRL` + `X`
|
||||||
- `Y`
|
- `Y`
|
||||||
|
@@ -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`
|
1. `git clone https://gitlab.com/kwoth/nadekobot -b v3 --depth 1`
|
||||||
2. `cd nadekobot`
|
2. `cd nadekobot`
|
||||||
3. `dotnet publish -c Release -o output/ src/NadekoBot/`
|
3. `dotnet publish -c Release -o output/ src/NadekoBot/`
|
||||||
4. `cd output && cp creds_example.yml creds.yml`
|
4. `cd output'
|
||||||
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)
|
5. 'cp creds_example.yml creds.yml`
|
||||||
6. [Enter your bot's token](#creds-guide)
|
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. Run the bot `dotnet NadekoBot.dll`
|
7. [Enter your bot's token](#creds-guide)
|
||||||
8. 🎉
|
8. Run the bot `dotnet NadekoBot.dll`
|
||||||
|
9. 🎉
|
||||||
|
|
||||||
##### Update Instructions
|
##### Update Instructions
|
||||||
|
|
||||||
|
@@ -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.
|
- Go to [Google Console][Google Console] and log in.
|
||||||
- Create a new project (name does not matter).
|
- Create a new project (name does not matter).
|
||||||
- Once the project is created, go into `Library`
|
- Once the project is created, go into `Library`
|
||||||
- Under the `YouTube APIs` section, enable `YouTube Data API`
|
- Under the `YouTube APIs` section
|
||||||
- On the left tab, access `Credentials`,
|
- 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 `Create Credentials` button,
|
||||||
- Click on `API Key`
|
- Click on `API Key`
|
||||||
- A new window will appear with your `Google API key`
|
- A new window will appear with your `Google API key`
|
||||||
|
@@ -160,18 +160,24 @@ namespace NadekoBot.Coordinator
|
|||||||
private void StartShard(int shardId)
|
private void StartShard(int shardId)
|
||||||
{
|
{
|
||||||
var status = _shardStatuses[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);
|
var proc = StartShardProcess(shardId);
|
||||||
_shardStatuses[shardId] = status with
|
_shardStatuses[shardId] = status with
|
||||||
|
@@ -487,7 +487,7 @@ WHERE GuildId={guildId}
|
|||||||
{
|
{
|
||||||
template = JsonConvert.SerializeObject(new
|
template = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
color = _bcs.Data.Color.Error,
|
color = _bcs.Data.Color.Error.PackedValue >> 8,
|
||||||
description = defaultMessage
|
description = defaultMessage
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -502,7 +502,7 @@ WHERE GuildId={guildId}
|
|||||||
{
|
{
|
||||||
template = JsonConvert.SerializeObject(new
|
template = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
color = _bcs.Data.Color.Error,
|
color = _bcs.Data.Color.Error.PackedValue >> 8,
|
||||||
description = template
|
description = template
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -166,10 +166,6 @@ public class XpService : INService
|
|||||||
{
|
{
|
||||||
var xp = item.Sum(x => x.XpAmount);
|
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 usr = uow.GetOrCreateUserXpStats(item.Key.GuildId, item.Key.User.Id);
|
||||||
var du = uow.GetOrCreateUser(item.Key.User);
|
var du = uow.GetOrCreateUser(item.Key.User);
|
||||||
|
|
||||||
|
@@ -270,7 +270,7 @@ public partial class Xp : NadekoModule<XpService>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await ReplyConfirmLocalizedAsync(strs.excluded(Format.Bold(channel.ToString())));
|
await ReplyConfirmLocalizedAsync(strs.not_excluded(Format.Bold(channel.ToString())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1143,9 +1143,9 @@ butts:
|
|||||||
args:
|
args:
|
||||||
- ""
|
- ""
|
||||||
translate:
|
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:
|
args:
|
||||||
- "en>fr Hello"
|
- "en fr Hello"
|
||||||
translangs:
|
translangs:
|
||||||
desc: "Lists the valid languages for translation."
|
desc: "Lists the valid languages for translation."
|
||||||
args:
|
args:
|
||||||
|
Reference in New Issue
Block a user