Add a migration script for role listeners
This commit is contained in:
parent
33b17b373f
commit
46fee88f03
2 changed files with 80 additions and 1 deletions
|
@ -11,6 +11,7 @@ namespace Geekbot.net.Lib.ReactionListener
|
|||
public class ReactionListener : IReactionListener
|
||||
{
|
||||
private readonly DatabaseContext _database;
|
||||
// <messageId, <reaction, roleId>
|
||||
private Dictionary<ulong, Dictionary<IEmote, ulong>> _listener;
|
||||
|
||||
public ReactionListener(DatabaseContext database)
|
||||
|
@ -50,6 +51,7 @@ namespace Geekbot.net.Lib.ReactionListener
|
|||
RoleId = role.Id.AsLong(),
|
||||
Reaction = emoji
|
||||
});
|
||||
await _database.SaveChangesAsync();
|
||||
|
||||
if (!_listener.ContainsKey(messageId))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue