mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-03 16:24:27 -05: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:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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}";
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user