1
Fork 0
mirror of https://gitlab.com/Kwoth/nadekobot.git synced 2024-10-03 04:23:13 +00:00

Added fixes from 1.9 branch:

- Custom reaction permission error fix
- Local tracks .lq fix after they're loaded from playlist
- Fixed some response strings
This commit is contained in:
Kwoth 2021-07-14 23:58:34 +02:00
parent 42d623b696
commit 5d9320941a
7 changed files with 8 additions and 8 deletions

View file

@ -411,9 +411,10 @@ namespace NadekoBot.Modules.CustomReactions.Services
{
if (pc.Verbose)
{
var returnMsg = _strings.GetText("trigger", sg.Id,
var returnMsg = _strings.GetText("perm_prevent", sg.Id,
index + 1,
Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), sg)));
try
{
await msg.Channel.SendErrorAsync(_eb, returnMsg).ConfigureAwait(false);

View file

@ -122,8 +122,7 @@ namespace NadekoBot.Modules.Games.Services
{
if (pc.Verbose)
{
var returnMsg = _strings.GetText("trigger", guild.Id, index + 1, Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), (SocketGuild)guild)));
try { await usrMsg.Channel.SendErrorAsync(_eb, returnMsg).ConfigureAwait(false); } catch { }
var returnMsg = _strings.GetText("perm_prevent", guild.Id, index + 1, Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), (SocketGuild)guild))); try { await usrMsg.Channel.SendErrorAsync(_eb, returnMsg).ConfigureAwait(false); } catch { }
Log.Information(returnMsg);
}
return true;

View file

@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Music
=> $"🔉 {(int) (mp.Volume * 100)}%";
public static string PrettyName(this ITrackInfo trackInfo)
=> $"**[{trackInfo.Title.TrimTo(60).Replace("[", "\\[").Replace("]", "\\]")}]({trackInfo.Url})**";
=> $"**[{trackInfo.Title.TrimTo(60).Replace("[", "\\[").Replace("]", "\\]")}]({trackInfo.Url.TrimTo(50, true)})**";
public static string PrettyInfo(this IQueuedTrackInfo trackInfo)
=> $"{trackInfo.PrettyTotalTime()} | {trackInfo.Platform} | {trackInfo.Queuer}";

View file

@ -147,7 +147,7 @@ namespace NadekoBot.Modules.Music
Provider = s.Platform.ToString(),
ProviderType = (MusicType)s.Platform,
Title = s.Title,
Query = s.Url,
Query = s.Platform == MusicPlatform.Local ? s.GetStreamUrl().Result!.Trim('"') : s.Url,
}).ToList();
MusicPlaylist playlist;

View file

@ -339,7 +339,7 @@ where ((guildid >> 22) % {_creds.TotalShards}) == {_client.ShardId};")
using var uow = _db.GetDbContext();
if (await uow.Repeaters.AsNoTracking().CountAsyncEF(x => x.GuildId == guildId) < MAX_REPEATERS)
if (await uow.Repeaters.CountAsyncEF(x => x.GuildId == guildId) < MAX_REPEATERS)
uow.Repeaters.Add(rep);
else
return null;

View file

@ -1401,7 +1401,7 @@ waifutransfer:
args:
- "@ExWaifu @NewOwner"
waifugift:
desc: "Gift an item to someone. This will increase their waifu value by 50% of the gifted item's value if you are not their waifu, or 95% if you are. Provide no parameters to see a list of items that you can gift."
desc: "Gift an item to someone. This will increase their waifu value by 50% of the gifted item's value if they are not your waifu, or 95% if they are. Provide no parameters to see a list of items that you can gift."
args:
- ""
- "Rose @Himesama"

View file

@ -923,7 +923,7 @@
"global_leaderboard": "Global XP Leaderboard",
"modified": "Modified server XP of the user {0} by {1}",
"club_create_error": "Failed creating the club. Make sure you're above level 5 and not a member of a club already.",
"club_create_too_long": "Club name is too long.",
"club_name_too_long": "Club name is too long.",
"club_created": "Club {0} successfully created!",
"club_not_exists": "That club doesn't exist.",
"club_applied": "You've applied for membership in {0} club.",