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