mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-03 08:14:28 -05:00
Removed unused modulebehavior struct and interface
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
using Discord;
|
|
||||||
using Discord.WebSocket;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace NadekoBot.Common.ModuleBehaviors;
|
|
||||||
|
|
||||||
public struct ModuleBehaviorResult
|
|
||||||
{
|
|
||||||
public bool Blocked { get; set; }
|
|
||||||
public string NewInput { get; set; }
|
|
||||||
|
|
||||||
public static ModuleBehaviorResult None() => new ModuleBehaviorResult
|
|
||||||
{
|
|
||||||
Blocked = false,
|
|
||||||
NewInput = null,
|
|
||||||
};
|
|
||||||
|
|
||||||
public static ModuleBehaviorResult FromBlocked(bool blocked) => new ModuleBehaviorResult
|
|
||||||
{
|
|
||||||
Blocked = blocked,
|
|
||||||
NewInput = null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IModuleBehavior
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Negative priority means it will try to apply as early as possible
|
|
||||||
/// Positive priority menas it will try to apply as late as possible
|
|
||||||
/// </summary>
|
|
||||||
int Priority { get; }
|
|
||||||
Task<ModuleBehaviorResult> ApplyBehavior(DiscordSocketClient client, IGuild guild, IUserMessage msg);
|
|
||||||
}
|
|
||||||
@@ -224,11 +224,11 @@ public class SearchImageCacher : INService
|
|||||||
}
|
}
|
||||||
catch (HttpRequestException)
|
catch (HttpRequestException)
|
||||||
{
|
{
|
||||||
return default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
return default;
|
return default;
|
||||||
|
|
||||||
image = QueryLocal(tags, forceExplicit, type, blacklistedTags);
|
image = QueryLocal(tags, forceExplicit, type, blacklistedTags);
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
|||||||
Reference in New Issue
Block a user