Various bugfixes and change ct.anyId return to Snowflake
This commit is contained in:
parent
c932269b7d
commit
bc1330bf33
7 changed files with 19 additions and 13 deletions
|
@ -32,6 +32,10 @@ export const ButtonInteractionEvt = reactionRolesEvt({
|
|||
};
|
||||
|
||||
if (context.stateless) {
|
||||
if (context.roleOrMenu == null) {
|
||||
// Not reaction from this plugin
|
||||
return;
|
||||
}
|
||||
const timeSinceCreation = moment.utc().valueOf() - idToTimestamp(int.message.id)!;
|
||||
if (timeSinceCreation >= BUTTON_INVALIDATION_TIME) {
|
||||
sendEphemeralReply(
|
||||
|
|
|
@ -3,7 +3,7 @@ import { GuildPluginData } from "knub";
|
|||
import { ReactionRolesPluginType } from "../types";
|
||||
import { ButtonMenuActions } from "./buttonMenuActions";
|
||||
|
||||
export const BUTTON_CONTEXT_SEPARATOR = "::";
|
||||
export const BUTTON_CONTEXT_SEPARATOR = ":rb:";
|
||||
|
||||
export async function getButtonAction(pluginData: GuildPluginData<ReactionRolesPluginType>, roleOrMenu: string) {
|
||||
if (await pluginData.guild.roles.fetch(roleOrMenu as Snowflake).catch(() => false)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue