I'm making a mute and unmute command for our system bot, the mute should be timed by hours, but I have it as seconds just to test it, anyway, my problem is that when the command is used whether there is an args1 which is the time the mute will last in hours or not it sends an error and just uses the default time, anyone knows why?
My code:
const { MessageEmbed } = require('discord.js');
module.exports = {
name: 'mute',
category: 'Owner',
aliases: ["t"],
description: 'Mute command.',
usage: 'mute <memeberid> <time>',
userperms: [],
botperms: [],
run: async (client, message, args) => {
if (!message.guild) return;
if (message.author.bot) return;
if (!message.member.roles.cache.has("916785912267034674")) return message.channel.send("You are not a staff member.").then(m => m.delete({timeout: 4000}))
if (!message.member.hasPermission("MANAGE_ROLES")) return message.channel.send("I don't have permission to do this.").then(m => m.delete({timeout: 4000}))
let time = args[1]
let reason = args[2]
if (!reason) reason = "Violated server rules";
if (!time) time = "1"
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const muterole = message.guild.roles.cache.get("916963460540157962");
const embed = new MessageEmbed()
.setTitle('Member muted!')
.addField('User muted', '<#'+user+'>')
.addField('muted by', message.author)
.addField('Reason', reason)
.addField('For', time + " hour(s)")
.setFooter('Time muted', client.user.displayAvatarURL())
.setThumbnail('https://th.bing.com/th/id/R.3e3ee93bca49df93c9751dbb284d7ec8?rik=fKLepuY9WQQnew&riu=http%3a%2f%2fimage.flaticon.com%2ficons%2fpng%2f512%2f25%2f25632.png&ehk=mdsvAx56LxLhOmmktJkpp5Vbse%2fxjnaW8mxahrVoQeU%3d&risl=&pid=ImgRaw&r=0')
.setTimestamp()
if (!args[0]) return message.channel.send("Please mention a member or use an ID.")
if (!user) return message.channel.send("Error: Can't find that user.")
if (user.user.id == message.author.id) return message.channel.send("Uhh, why don't you just shut up like humans?")
if (user.user.id == client.user.id) return message.channel.send("You good bro?")
if (user == message.author.id) return message.channel.send("Uhh, why don't you just shut up like humans?")
if (user == client.user.id) return message.channel.send("You good bro?")
if (user.roles.cache.has("916963460540157962")) return message.channel.send("Chill, his already muted!")
if (user.roles.cache.has("916785912267034674")) return message.channel.send("You can't mute staff, idoit.")
message.channel.send(embed).catch(err => console.log("Error: " + err));
user.roles.add("916963460540157962").then(user.roles.remove("916963460540157962") ({timeout: time+"00000"})).catch(err => console.log("Error: " + err));
}
}
Error:
(node:1460) UnhandledPromiseRejectionWarning: TypeError: user.roles.remove(...) is not a function
at Object.run (/home/runner/DwaCraft-Main-bot/commands/owner/Mute.js:47:87)
at module.exports (/home/runner/DwaCraft-Main-bot/events/guild/message.js:52:11)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (/home/runner/DwaCraft-Main-bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/runner/DwaCraft-Main-bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/runner/DwaCraft-Main-bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/runner/DwaCraft-Main-bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/runner/DwaCraft-Main-bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/runner/DwaCraft-Main-bot/node_modules/ws/lib/event-target.js:132:16)
at WebSocket.emit (events.js:314:20)
(node:1460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1460) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Thanks !
You are using user.roles.remove(id) ({timeout: time+"00000"}) which is obviously bad syntax. Also, role removal does not have a built in timeout. You will need to use setTimeout, or a database for larger times
await user.roles.add(id)
setTimeout(() => user.roles.remove(id), time * 1000) // *1000 for seconds
As I said before, it only works well with short times, use a database for longer times
The syntax seems to be incorrect, try with :
user.roles.add("916963460540157962").then(() => setTimeout(() => user.roles.remove("916963460540157962", +time))
Related
I'm making a unban command, it was all going well till I tried to make a unban command, I can't use .catch to check if the user is banned or not, so is there a better way or a fix?
I'm planning on changing it to embeds to add more style to it, if that may help you some how :D
Here is the ban / unban command:
const { MessageEmbed } = require('discord.js');
//ban
module.exports = {
name: 'ban',
category: 'Owner',
description: 'Bans a member.',
aliases: [],
usage: 'ban <user>',
userperms: [],
botperms: [],
run: async (client, message, args) => {
if (!message.guild.member(message.author).hasPermission("BAN_MEMBERS")) {
return message.channel.send('You do not have the permission to ban users!');
}
if (!message.guild.member(client.user).hasPermission("BAN_MEMBERS")) {
return message.channel.send("I don't have the permission to ban users!");
}
if (message.mentions.users.size === 0) {
return message.channel.send("Can't find this member.");
}
if (message.mentions.members.first().id == message.author.id) {
return message.channel.send("Silly you, why are you trying to ban yourself?")
}
var member = message.mention.members.first();
member
.ban()
.then(member => {
guild.members.ban(id);
message.channel.send("*it's not a bird,*, *it's just* **" + member.displayName + "** *getting banned! :hammer:*");
})
.catch(() => {
message.channel.send("You can't ban this member");
});
},
};
//unban
module.exports = {
name: 'unban',
category: 'Owner',
description: 'Unbans a banned member.',
aliases: [],
usage: 'unban <user>',
userperms: [],
botperms: [],
run: async (client, message, args) => {
if (!message.guild.member(message.author).hasPermission("BAN_MEMBERS")) {
return message.channel.send('You do not have the permission to unban users!');
}
if (!message.guild.member(client.user).hasPermission("BAN_MEMBERS")) {
return message.channel.send("I don't have the permission to unban users!");
}
if (message.mentions.users.size === 0) {
return message.channel.send("Can't find this member.");
}
if (message.mentions.members.first().id == message.author.id) {
return message.channel.send("Lol, your not banned....")
}
var member = message.mentions.members.first();
(member => {
message.guild.members.unban(id)
message.channel.send("**" + member.displayName + "** **unbanned! :hammer:**");
})
.catch(() => {
message.channel.send("User not banned.");
});
},
};
Error:
(node:1551) UnhandledPromiseRejectionWarning: TypeError: message.mentions.members.first.catch is not a function
at Object.run (/home/runner/DwaCraft-Ticket-bot/commands/owner/ban-unban.js:65:45)
at module.exports (/home/runner/DwaCraft-Ticket-bot/events/guild/message.js:55:11)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (/home/runner/DwaCraft-Ticket-bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/runner/DwaCraft-Ticket-bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/runner/DwaCraft-Ticket-bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/runner/DwaCraft-Ticket-bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/runner/DwaCraft-Ticket-bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/runner/DwaCraft-Ticket-bot/node_modules/ws/lib/event-target.js:132:16)
at WebSocket.emit (events.js:314:20)
(node:1551) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1551) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
You might need to chain the catch block with the unban function.
message.guild.members.unban(id)
.then(() => {
message.channel.send("**" + member.displayName + "** **unbanned! :hammer:**" )
})
.catch(() => {
message.channel.send("User not banned.");
})
You can get the member's Id from the member variable through member.id
i need help with this for someone reason when i type !ticket it gives me a error the code and the error i tried what i could i couldent get it to work so i came here to ask please let me know if you could help. its probably a really simple issue and im dumb to realize it. i also cant get the emojis to work if you can help with that as well that would be nice
const Discord = require("discord.js")
const ms = require('ms');
module.exports = {
name: 'ticket',
usage: '%ticket <reason>',
description: 'makes a ticket',
async execute(client, message, args, cmd, discord) {
const channel = await message.guild.channels.create(`ticket: ${message.user.tag}`);
channel.setParent('855596395783127081');
channel.updateOverwrite(message.guild.id, {
SEND_MESSAGE: false,
VEIW_CHANNEL: false
})
channel.updateOverwrite(message.auther, {
SEND_MESSAGE: true,
VEIW_CHANNEL: true
})
const reactionMessage = await channel.send(`Thank you for contacting support! A staff member will be with you as soon as possible`);
try {
await reactionMessage.react(":lock:");
await reactionMessage.react(":no_entry:");
} catch (err) {
channel.send(`Error Sending Emojis`);
throw err;
}
const collector = reactionMessage.createReactionCollector((reaction, user) =>
message.guild.member.cache.find((member) => member.id === userid).hasPermission('ADMINISTRATOR'), { dispose: true }
);
collector.on('collect', (reaction, user) => {
switch (reaction.emoji.name) {
case ":lock:":
channel.updateOverwrite(message.auther, { SEND_MESSAGE: false });
break;
case ":no_entry:":
channel.send('Deleteing ticket in 5 seconds');
setTimeout(() => channel.delete(), 5000);
break;
}
});
message.channel.send(`We will be right withyou! ${channel}`).then((msg) => {
setTimeout(() => msg.delete(), 7000)
setTimeout(() => message.delete(), 7000)
})
}
}
Heres the error
PS C:\Users\lolzy\OneDrive\Desktop\discordbot> node .
Cbs slave is online!
(node:19284) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tag' of undefined
at Object.execute (C:\Users\lolzy\OneDrive\Desktop\discordbot\commands\ticket.js:10:85)
at module.exports (C:\Users\lolzy\OneDrive\Desktop\discordbot\events\guild\message.js:10:26)
at Client.emit (events.js:376:20)
at MessageCreateAction.handle (C:\Users\lolzy\OneDrive\Desktop\discordbot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\lolzy\OneDrive\Desktop\discordbot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\lolzy\OneDrive\Desktop\discordbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\lolzy\OneDrive\Desktop\discordbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\lolzy\OneDrive\Desktop\discordbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\lolzy\OneDrive\Desktop\discordbot\node_modules\ws\lib\event-target.js:132:16)
at WebSocket.emit (events.js:376:20)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19284) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of
an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:19284) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that
are not handled will terminate the Node.js process with a non-zero exit code.
In Message Object there is no properties that called .user it should be .author which is return User Object , docs here
So the right code will be
const channel = await message.guild.channels.create(`ticket: ${message.author.tag}`);
Hello I have a ban command. Also I have a error. This is a code
I want solve. But I don't.
const Discord = require('discord.js')
module.exports = {
komut: "ban",
açıklama: "",
kategori: "moderasyon",
alternatifler: ["!ban", "!yasakla"],
kullanım: "!ban",
yetki: "BAN_MEMBERS"
}
module.exports.baslat = (message) => {
// if(!message.member.hasPermission(["BAN_MEMBERS"])) return message.channel.send("Ban atabilmek için yetkili olman gerek!")
let banMember = message.mention.members.first() || message.guild.member.get(args[0])
if(banMember) return message.channel.send("Lütfen banlamak istediğiniz kişiyi etiketleyin!")
let reason = args.slice(1).join(" ")
if (!reason) reason = "Lütfen bir sebep belirtiniz!"
// if(!message.guild.me.hasPermission(["BAN_MEMBERS" , "ADMINISTRATOR"])) return message.channel.send("Bu komutu kullanmak için yetkim yok")
message.delete()
banMember.send(`Merhaba, iyi günler dilerim. ${message.guild.name} adlı sunucudan ${reason} sebebiyle banlandın.`).then(() =>
message.guild.ban(banMember, {days : 1 , reason : reason})).catch(err => console.log(err))
message.channel.send(`**${banMember.user.tag}** banlandı.`)
let embed = new Discord.RichEmbed()
.setColor("RED")
.setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL)
.addField("Moderasyon :", "ban")
.addField("Kişi : ", banMember.user.username)
.addField("Banlayan Admin :", message.author.username)
.addField("Sebep : ", reason)
.addField("Date :", message.createdAt.toLocaleString())
let sChannel = message.guild.channels.find(c => c.name === "ban-log")
sChannel.send({embed:embed})
};
This is a terminal error :
(node:16116) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'members' of undefined
at Object.module.exports.baslat (C:\Users\RYZEN\Desktop\U4 BOT\komutlar\moderasyon\ban.js:16:33)
at AdvancedClient.<anonymous> (C:\Users\RYZEN\Desktop\U4 BOT\node_modules\discordjs-advanced\src\client.js:549:5)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16116) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16116) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Please help me
Okey, don't see a
module.exports = {
komut: "ban",
açıklama: "",
kategori: "moderasyon",
alternatifler: ["!ban", "!yasakla"],
kullanım: "!ban",
yetki: "BAN_MEMBERS"
}
Note : I change members and users. Bot don't work again.
(Sorry for my bad english :) )
You are using message.mention.members.first() but it should be mentions -
message.mentions.members.first()
I'm using discord.js to try make a bot with the sole purpose of whenever a member is given a specific role (alpha, bravo, charlie, delta) it will send an announcement to a specific channel (#general) saying congratulations on becoming part of the faction! How would I go about doing this? (what I know is that it's part of the "GuildMembers" chunk)
const Discord = require('discord.js');
const client = new Discord.Client();
const token = 'NzUzNTY0NjA0MjM1MzgyODI1.X1oBug.E0GEmnakRtQMbOfg5IwllQsW_Ps';
client.on('ready', () => {
console.log('This bot is online!')
})
client.on("guildMemberUpdate", async(oldMember, newMember) => {
// On `guildMemberUpdate`
if (oldMember.roles.cache !== newMember.roles.cache) {
// Check if a role was updated
let newRole;
newMember.roles.cache.forEach((role) => {
if (oldMember.roles.cache.includes(role)) return;
// Check for the new role that was added
let roleNames = ["bobbies", "beebos", "babbos", "bobbios"];
if (roleNames.toLowerCase().includes(role.name.toLowerCase())) {
// Check for only `['bobbies', 'beebos', 'babbos', 'bobbios']`
newRole = role;
}
});
// Anything you want to run here with the `newRole` data.
const channel = oldMember.guild.channels.cache.find(
(channel) => channel.name === "general"
);
channel.send("Congratulations on becoming part of the faction!");
}
});
client.login(token);
This unfortunately returns with the error:
(node:6240) UnhandledPromiseRejectionWarning: TypeError: oldMember.roles.cache.includes is not a function
at C:\Users\sanderj\Desktop\Discord Bot\index.js:18:39
at Map.forEach (<anonymous>)
at Client.<anonymous> (C:\Users\sanderj\Desktop\Discord Bot\index.js:17:31)
at Client.emit (events.js:315:20)
at Object.module.exports [as GUILD_MEMBER_UPDATE] (C:\Users\sanderj\Desktop\Discord Bot\node_modules\discord.js\src\client\websocket\handlers\GUILD_MEMBER_UPDATE.js:25:16)
at WebSocketManager.handlePacket (C:\Users\sanderj\Desktop\Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\sanderj\Desktop\Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\sanderj\Desktop\Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\sanderj\Desktop\Discord Bot\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20)
(node:6240) UnhandledPromiseRejectionWarning: Unhandled promise rejection.
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6240) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Check out Client#guildMemberUpdate which gets emitted when something about a member property gets changed (i.e. a role is added). Try adding this code to your bot:
client.on("guildMemberUpdate", async (oldMember, newMember) => {
// On `guildMemberUpdate`
if (!oldMember.roles.cache.equals(newMember.roles.cache)) {
// Check if a role was updated
let newRole;
newMember.roles.cache.forEach((role) => {
if (oldMember.roles.cache.includes(role)) return;
// Check for the new role that was added
let roleNames = ["alpha", "bravo", "charlie", "delta"];
if (roleNames.toLowerCase().includes(role.name.toLowerCase())) {
// Check for only `['alpha', 'bravo', 'charlie', 'delta']`
newRole = role;
}
});
// Anything you want to run here with the `newRole` data.
const channel = oldMember.guild.channels.cache.find(
(channel) => channel.name === "general"
);
channel.send("Congratulations on becoming part of the faction!");
}
});
Upon running the command, the bot should post an embed message with a reaction (which it does, but with an error). The error has to do with assigning the role I believe because no role is assigned when a reaction is added. If there is an easier way to do this using the role id instead of searching for the role name I could do that too.
read-me-first.js
module.exports = {
name: 'read-me-first',
cooldown: 5,
description: 'Server verification',
// eslint-disable-next-line no-unused-vars
execute(message, args) {
message.delete();
const Discord = require('discord.js');
const exampleEmbed = new Discord.MessageEmbed()
.setColor('#E33333')
.setTitle('VERIFICATION')
.setDescription('<a:loading:717623386247004270> By reacting to this message, you agree to the <#717624229713018910> and gain access to the rest of the discord server. <a:loading:717623386247004270>')
.attachFiles(['/home/shares/public/BytePvP/bytepvp.png'])
.setThumbnail('attachment://bytepvp.png')
// .setTimestamp()
.setFooter('BytePvP', 'attachment://bytepvp.png');
if (!message.member.hasPermission('MANAGE_MESSAGES')) {
return message.reply('You do not have permission to use this command!');
}
message.channel.send({ embed: exampleEmbed }).then(embedMessage => {
embedMessage.react('717623421068116008')
.catch(() => console.error('One of the emojis failed to react.'));
});
const filter = (reaction, user) => {
return ['717623421068116008'].includes(reaction.emoji.name) && user.id === message.author.id;
};
message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
.then(collected => {
const reaction = collected.first();
const role = message.guild.roles.cache.find(role => role.name === 'Member');
const member = message.mentions.members.first();
member.roles.add(role);
});
},
};
Error:
(node:32547) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'roles' of undefined
at /home/shares/public/BytePvP/commands/read-me-first.js:35:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:32547) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:32547) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Edits made:
message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
.then((collected, user) => {
const reaction = collected.first();
const role = message.guild.roles.cache.find(role => role.name === 'Member');
const member = message.guild.member(user);
member.roles.add(role);
});
New error:
(node:24026) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'roles' of null
at /home/shares/public/BytePvP/commands/read-me-first.js:35:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:24026) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:24026) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
Alternatively, you could use :
.then((collected, user) => {
and then convert the user into a member using :
const member = message.guild.member(user);