PingableRoles: clear the cache properly
This commit is contained in:
parent
feb977eee0
commit
69bcfb8bbd
1 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,8 @@ export class PingableRoles extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.pingableRoles.delete(args.channelId, args.role.id);
|
await this.pingableRoles.delete(args.channelId, args.role.id);
|
||||||
|
this.cache.delete(args.channelId);
|
||||||
|
|
||||||
msg.channel.createMessage(
|
msg.channel.createMessage(
|
||||||
successMessage(`**${args.role.name}** is no longer set as pingable in <#${args.channelId}>`)
|
successMessage(`**${args.role.name}** is no longer set as pingable in <#${args.channelId}>`)
|
||||||
);
|
);
|
||||||
|
@ -73,6 +75,8 @@ export class PingableRoles extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.pingableRoles.add(args.channelId, args.role.id);
|
await this.pingableRoles.add(args.channelId, args.role.id);
|
||||||
|
this.cache.delete(args.channelId);
|
||||||
|
|
||||||
msg.channel.createMessage(successMessage(`**${args.role.name}** has been set as pingable in <#${args.channelId}>`));
|
msg.channel.createMessage(successMessage(`**${args.role.name}** has been set as pingable in <#${args.channelId}>`));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue