|
|
|
|
@ -410,36 +410,24 @@ const wordMenu = async (
|
|
|
|
|
}
|
|
|
|
|
case "allowedUsers": {
|
|
|
|
|
await i.deferUpdate();
|
|
|
|
|
current.allowed.users = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.users,
|
|
|
|
|
"member",
|
|
|
|
|
"Word Filter"
|
|
|
|
|
current.allowed.users = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.users, "member", "Word Filter")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "allowedRoles": {
|
|
|
|
|
await i.deferUpdate();
|
|
|
|
|
current.allowed.roles = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.roles,
|
|
|
|
|
"role",
|
|
|
|
|
"Word Filter"
|
|
|
|
|
current.allowed.roles = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.roles, "role", "Word Filter")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "allowedChannels": {
|
|
|
|
|
await i.deferUpdate();
|
|
|
|
|
current.allowed.channels = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.channels,
|
|
|
|
|
"channel",
|
|
|
|
|
"Word Filter"
|
|
|
|
|
current.allowed.channels = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.channels, "channel", "Word Filter")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
@ -556,34 +544,22 @@ const inviteMenu = async (
|
|
|
|
|
await i.deferUpdate();
|
|
|
|
|
switch (i.values[0]) {
|
|
|
|
|
case "users": {
|
|
|
|
|
current.allowed.users = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.users,
|
|
|
|
|
"member",
|
|
|
|
|
"Invite Settings"
|
|
|
|
|
current.allowed.users = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.users, "member", "Invite Settings")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "roles": {
|
|
|
|
|
current.allowed.roles = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.roles,
|
|
|
|
|
"role",
|
|
|
|
|
"Invite Settings"
|
|
|
|
|
current.allowed.roles = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.roles, "role", "Invite Settings")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "channels": {
|
|
|
|
|
current.allowed.channels = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.channels,
|
|
|
|
|
"channel",
|
|
|
|
|
"Invite Settings"
|
|
|
|
|
current.allowed.channels = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.channels, "channel", "Invite Settings")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
@ -803,12 +779,14 @@ const mentionMenu = async (
|
|
|
|
|
}
|
|
|
|
|
case "roles": {
|
|
|
|
|
await i.deferUpdate();
|
|
|
|
|
current.allowed.rolesToMention = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.rolesToMention,
|
|
|
|
|
"role",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
current.allowed.rolesToMention = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.rolesToMention,
|
|
|
|
|
"role",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
@ -820,34 +798,28 @@ const mentionMenu = async (
|
|
|
|
|
await i.deferUpdate();
|
|
|
|
|
switch (i.values[0]) {
|
|
|
|
|
case "users": {
|
|
|
|
|
current.allowed.users = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.users,
|
|
|
|
|
"member",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
current.allowed.users = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.users, "member", "Mention Settings")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "roles": {
|
|
|
|
|
current.allowed.roles = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.roles,
|
|
|
|
|
"role",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
current.allowed.roles = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.roles, "role", "Mention Settings")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "channels": {
|
|
|
|
|
current.allowed.channels = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.channels,
|
|
|
|
|
"channel",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
current.allowed.channels = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.channels,
|
|
|
|
|
"channel",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
@ -1004,23 +976,15 @@ const cleanMenu = async (
|
|
|
|
|
case "allowed": {
|
|
|
|
|
switch (i.values[0]) {
|
|
|
|
|
case "users": {
|
|
|
|
|
current.allowed.users = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.users,
|
|
|
|
|
"member",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
current.allowed.users = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.users, "member", "Mention Settings")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "roles": {
|
|
|
|
|
current.allowed.roles = await toSelectMenu(
|
|
|
|
|
interaction,
|
|
|
|
|
m,
|
|
|
|
|
current.allowed.roles,
|
|
|
|
|
"role",
|
|
|
|
|
"Mention Settings"
|
|
|
|
|
current.allowed.roles = _.cloneDeep(
|
|
|
|
|
await toSelectMenu(interaction, m, current.allowed.roles, "role", "Mention Settings")
|
|
|
|
|
);
|
|
|
|
|
unsavedChanges = true;
|
|
|
|
|
break;
|
|
|
|
|
|