mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Early behavior fixups:
- Priorities are now higher number -> higher priority - Priorities are now actually respected - Early behaviors now print custom messages when they perform an action (Filter trigger, blacklist, poll vote, etc) - small cleanup
This commit is contained in:
@@ -19,8 +19,7 @@ namespace NadekoBot.Modules.Games.Services
|
||||
{
|
||||
public ConcurrentDictionary<ulong, PollRunner> ActivePolls { get; } = new ConcurrentDictionary<ulong, PollRunner>();
|
||||
|
||||
public int Priority => -5;
|
||||
public ModuleBehaviorType BehaviorType => ModuleBehaviorType.Executor;
|
||||
public int Priority => 5;
|
||||
|
||||
private readonly DbService _db;
|
||||
private readonly IBotStrings _strs;
|
||||
@@ -115,7 +114,18 @@ namespace NadekoBot.Modules.Games.Services
|
||||
|
||||
try
|
||||
{
|
||||
return await poll.TryVote(msg).ConfigureAwait(false);
|
||||
var voted = await poll.TryVote(msg).ConfigureAwait(false);
|
||||
|
||||
if (voted)
|
||||
{
|
||||
Log.Information("User {UserName} [{UserId}] voted in a poll on {GuildName} [{GuildId}] server",
|
||||
msg.Author.ToString(),
|
||||
msg.Author.Id,
|
||||
guild.Name,
|
||||
guild.Id);
|
||||
}
|
||||
|
||||
return voted;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user