mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
correctif userinfo
This commit is contained in:
@@ -8,12 +8,17 @@ module.exports = {
|
||||
|
||||
async execute(message, args, client) {
|
||||
let user;
|
||||
if (args.length > 0) {
|
||||
const userId = args[0];
|
||||
user = message.guild.members.cache.get(userId)?.user;
|
||||
if (args.length > 0) {
|
||||
const userId = args[0].match(/(\d+)/);
|
||||
if (userId && userId[1]) {
|
||||
user = message.guild.members.cache.get(userId[1])?.user;
|
||||
}
|
||||
} else {
|
||||
user = message.mentions.users.first() || message.author;
|
||||
}
|
||||
if (!user) {
|
||||
return message.reply('Utilisateur introuvable.');
|
||||
}
|
||||
const member = message.guild.members.cache.get(user.id);
|
||||
if (!user) {
|
||||
return message.reply('Utilisateur introuvable.');
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Tutur33/gestion.git"
|
||||
},
|
||||
"author": "Tutur33",
|
||||
"author": "Valou336 && Tutur33 ",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Tutur33/gestion/issues"
|
||||
|
||||
Reference in New Issue
Block a user