Parent Directory
|
Revision Log
Release version 1.10.0 * Added -queues command to list all queued jobs * Added -joke command to fetch random jokes * Added support of user tags in some user-based commands
1 | const { Collection } = require('discord.js'); |
2 | |
3 | async function getUser(input, { guild, mentions = { members: new Collection() } }, member = true) { |
4 | if (await mentions[member ? "members" : 'users'].first()) { |
5 | return await mentions[member ? "members" : 'users'].first(); |
6 | } |
7 | |
8 | if (input.indexOf('#') !== -1) { |
9 | return await guild[member ? "members" : 'users'].cache.find(m => m.user.tag === input); |
10 | } |
11 | |
12 | return await guild[member ? "members" : 'users'].fetch(input); |
13 | } |
14 | |
15 | module.exports = { getUser }; |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |