mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	fix: repeat, greet, bye, boost messages can now once again mention anyone
fix: .say #channel fixed
This commit is contained in:
		@@ -97,7 +97,7 @@ public class GreetService : INService, IReadyExecutor
 | 
			
		||||
        {
 | 
			
		||||
            var newContent = await _repSvc.ReplaceAsync(toSend,
 | 
			
		||||
                new(client: _client, guild: user.Guild, channel: channel, users: user));
 | 
			
		||||
            var toDelete = await _sender.Response(channel).Text(newContent).SendAsync();
 | 
			
		||||
            var toDelete = await _sender.Response(channel).Text(newContent).Sanitize(false).SendAsync();
 | 
			
		||||
            if (conf.BoostMessageDeleteAfter > 0)
 | 
			
		||||
                toDelete.DeleteAfter(conf.BoostMessageDeleteAfter);
 | 
			
		||||
 | 
			
		||||
@@ -217,7 +217,7 @@ public class GreetService : INService, IReadyExecutor
 | 
			
		||||
        text = await _repSvc.ReplaceAsync(text, repCtx);
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            var toDelete = await _sender.Response(channel).Text(text).SendAsync();
 | 
			
		||||
            var toDelete = await _sender.Response(channel).Text(text).Sanitize(false).SendAsync();
 | 
			
		||||
            if (conf.AutoDeleteByeMessagesTimer > 0)
 | 
			
		||||
                toDelete.DeleteAfter(conf.AutoDeleteByeMessagesTimer);
 | 
			
		||||
        }
 | 
			
		||||
@@ -258,7 +258,7 @@ public class GreetService : INService, IReadyExecutor
 | 
			
		||||
        text = await _repSvc.ReplaceAsync(text, repCtx);
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            var toDelete = await _sender.Response(channel).Text(text).SendAsync();
 | 
			
		||||
            var toDelete = await _sender.Response(channel).Text(text).Sanitize(false).SendAsync();
 | 
			
		||||
            if (conf.AutoDeleteGreetMessagesTimer > 0)
 | 
			
		||||
                toDelete.DeleteAfter(conf.AutoDeleteGreetMessagesTimer);
 | 
			
		||||
        }
 | 
			
		||||
@@ -360,7 +360,7 @@ public class GreetService : INService, IReadyExecutor
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            await _sender.Response(user).Text(smartText).SendAsync();
 | 
			
		||||
            await _sender.Response(user).Text(smartText).Sanitize(false).SendAsync();
 | 
			
		||||
        }
 | 
			
		||||
        catch
 | 
			
		||||
        {
 | 
			
		||||
@@ -573,8 +573,6 @@ public class GreetService : INService, IReadyExecutor
 | 
			
		||||
 | 
			
		||||
    public bool SetBoostMessage(ulong guildId, ref string message)
 | 
			
		||||
    {
 | 
			
		||||
        message = message.SanitizeMentions();
 | 
			
		||||
 | 
			
		||||
        using var uow = _db.GetDbContext();
 | 
			
		||||
        var conf = uow.GuildConfigsForId(guildId, set => set);
 | 
			
		||||
        conf.BoostMessage = message;
 | 
			
		||||
 
 | 
			
		||||
@@ -269,7 +269,11 @@ public sealed class RepeaterService : IReadyExecutor, INService
 | 
			
		||||
            var text = SmartText.CreateFrom(repeater.Message);
 | 
			
		||||
            text = await _repSvc.ReplaceAsync(text, repCtx);
 | 
			
		||||
 | 
			
		||||
            var newMsg = await _sender.Response(channel).Text(text).SendAsync();
 | 
			
		||||
            var newMsg = await _sender.Response(channel)
 | 
			
		||||
                                      .Text(text)
 | 
			
		||||
                                      .Sanitize(false)
 | 
			
		||||
                                      .SendAsync();
 | 
			
		||||
            
 | 
			
		||||
            _ = newMsg.AddReactionAsync(new Emoji("🔄"));
 | 
			
		||||
 | 
			
		||||
            if (_noRedundant.Contains(repeater.Id))
 | 
			
		||||
 
 | 
			
		||||
@@ -85,6 +85,7 @@ public partial class Utility : NadekoModule
 | 
			
		||||
 | 
			
		||||
        await Response()
 | 
			
		||||
              .Text(message)
 | 
			
		||||
              .Channel(channel)
 | 
			
		||||
              .UserBasedMentions()
 | 
			
		||||
              .SendAsync();
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -357,9 +357,10 @@ public sealed partial class ResponseBuilder
 | 
			
		||||
        fileName = name;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    public PaginatedResponseBuilder Paginated()
 | 
			
		||||
        => new(this);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
public class PaginatedResponseBuilder
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user