Skip to content
Snippets Groups Projects
Commit 9553615e authored by Kwoth's avatar Kwoth
Browse files

- Added placeholder squash migration

- Hierarchy check for WarnPunish role
- Upped version to 2.46.2
parent c20487d0
No related branches found
Tags 2.46.2
No related merge requests found
......@@ -2,12 +2,13 @@
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
## Unreleased
## [2.46.2] - 14.07.2021
### Fixed
- Fixed .save for local songs
- Fixed .lq for local songs if the song names are too long
- Fixed hierarchy check for .warnpunish with role argument
## [2.46.1] - 21.06.2021
......
This diff is collapsed.
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations
{
// placeholder migration for v3
public partial class squash : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
......@@ -324,6 +324,13 @@ namespace NadekoBot.Modules.Administration
{
var punish = PunishmentAction.AddRole;
var success = _service.WarnPunish(ctx.Guild.Id, number, punish, time, role);
if (ctx.Guild.OwnerId != ctx.User.Id &&
role.Position >= ((IGuildUser)ctx.User).GetRoles().Max(x => x.Position))
{
await ReplyErrorLocalizedAsync("role_too_high");
return;
}
if (!success)
return;
......
......@@ -18,7 +18,7 @@ namespace NadekoBot.Core.Services.Impl
private readonly IBotCredentials _creds;
private readonly DateTime _started;
public const string BotVersion = "2.46.1";
public const string BotVersion = "2.46.2";
public string Author => "Kwoth#2452";
public string Library => "Discord.Net";
......
......@@ -80,6 +80,7 @@
"greet_off": "Greet announcements disabled.",
"greet_on": "Greet announcements enabled on this channel.",
"hierarchy": "You can't use this command on users with a role higher or equal than yours (or mine) in the role hierarchy.",
"role_too_high": "You can't use this command with roles which are above your highest role, unless you're server administrator.",
"images_loading": "Images will be reloaded within a few seconds.",
"insuf_perms_i": "I have insufficient permissions.",
"insuf_perms_u": "You have insufficient permissions.",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment