mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Мелкие правки
This commit is contained in:
parent
f91d1970eb
commit
07318d0d4a
1 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ class Selectroles extends BaseCommand {
|
||||||
* @param {import("../../base/JaBa")} client
|
* @param {import("../../base/JaBa")} client
|
||||||
*/
|
*/
|
||||||
async onLoad(client) {
|
async onLoad(client) {
|
||||||
client.on("interactionCreate", interaction => {
|
client.on("interactionCreate", async interaction => {
|
||||||
if (!interaction.isSelectMenu()) return;
|
if (!interaction.isSelectMenu()) return;
|
||||||
|
|
||||||
if (interaction.customId === "auto_roles") {
|
if (interaction.customId === "auto_roles") {
|
||||||
|
@ -50,11 +50,11 @@ class Selectroles extends BaseCommand {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const id of removed) {
|
for (const id of removed) {
|
||||||
interaction.member.roles.remove(id.value);
|
await interaction.member.roles.remove(id.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const id of interaction.values) {
|
for (const id of interaction.values) {
|
||||||
interaction.member.roles.add(id);
|
await interaction.member.roles.add(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
|
|
Loading…
Reference in a new issue