Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Commit

Permalink
Prevent next state action while sending messages (#3)
Browse files Browse the repository at this point in the history
* Update README.md

* prevent nextState action while sending messages
  • Loading branch information
Charly6596 authored Jan 16, 2021
1 parent 47e6b8c commit e2cb4d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ El token se puede encontrar en la página para desarrolladores de Discord.

## Roles
El bot solo responderá a los usuarios con ciertos roles, explicados a continuación.
Actualmente se pueden modificar los roles en el archivo `Constants.cs`.

### ModRol
Puede iniciar la votación con el comando `newpoll título`
Expand Down
2 changes: 1 addition & 1 deletion src/Discord/DiscordPolls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private void OnGuildReaction(SocketReaction reaction, IUserMessage msg, IGuildUs

_polls.AddCandidate(usr.Id, name);
}
else if (reaction.Emote.Name == Constants.NextEmoji.Name && usr.RoleIds.Contains(Constants.ModRole))
else if (reaction.Emote.Name == Constants.NextEmoji.Name && _polls.ActivePoll.State != PollState.SendingMessages && usr.RoleIds.Contains(Constants.ModRole))
{
_polls.NextState();
}
Expand Down

0 comments on commit e2cb4d7

Please sign in to comment.