{"_id":"@aquarius-bot/users","_rev":"1-bf4b80ea2e8ac66d4c0e0863acaef92d","name":"@aquarius-bot/users","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@aquarius-bot/users","version":"0.0.1","description":"User helper methods for Discord","author":{"name":"Ian Mitchell","email":"ian.mitchel1@live.com"},"homepage":"https://github.com/ianmitchell/aquarius","repository":{"type":"git","url":"git+ssh://git@github.com/ianmitchell/aquarius.git","directory":"packages/users"},"publishConfig":{"access":"public"},"license":"MIT","keywords":["discord","discord.js","bot","node","aquarius"],"main":"./users.js","type":"module","rollup":{"skip":true},"peerDependencies":{"discord.js":"^12.0.0"},"gitHead":"92dcf8ee9a7b7acd10d209796d3a65c996e30e1d","bugs":{"url":"https://github.com/ianmitchell/aquarius/issues"},"_id":"@aquarius-bot/users@0.0.1","_nodeVersion":"13.7.0","_npmVersion":"lerna/3.20.2/node@v13.7.0+x64 (darwin)","dist":{"integrity":"sha512-atkCuOcRM1FUhhsFFSjSm5ZndcbzuzTADZvyNfIM8xWfT/4vKu8AcKLDCR2el7kZNlmd2+Xp7eJFy6TAIZTITQ==","shasum":"25276e1083a0ead413227c82b5a1bd99190eb9ed","tarball":"https://registry.npmjs.org/@aquarius-bot/users/-/users-0.0.1.tgz","fileCount":6,"unpackedSize":5492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJengAHCRA9TVsSAnZWagAARi8QAJtEM3/UEPj9Ch1Ka5QI\nGoVn/Sk1pbR0T9b4zAK/GAz3pbQJspNzt8vbSF+v/cjkq6maoY3bRcLMW8dq\ngbl5ksX2PDE3a/UNpqJjEqxHk9Yd2xUMEhgKTLNZRxxU5BS2+0tRYb49k1ei\n2B8dxsNdr+URtbX99L8ILlpFJhTEB44bgR8EF6T0Y4cUWlu+VR0EQfIeEiEr\n2UkuSILEy7cvMNZDnwSAHSx1zu9lcQdrV10/E/XVttCt3ARON9XUay/VY7vH\nvccijLpe/Apf7bb+4x2Zm03SekmNPHzgoq4E5F+fYj/f6ZVcfNBbkj9D/bqw\npFDLh9tRcSaxNyykhaBKWUhzYaflotAxWcCjAef6wnPhGcKK6wSDu2qT+1Vh\nkudagfKzGzEITAN/haHR9J59Ylwg5TbaRFdp4/1GfAYzaN8txlcSBi6tjH2r\n0IIw2dRsp4ZNFEAabTDDxBZEQtYvQvQmZSKJ5XUaT6H+pmtw35r6sHJAuti6\ni+H5m27YvtyzZZA9r7eDhtxpe5jDHYGWm0ClCWNfXWmhWmukV9673PiS4lHF\nT4naRETLGOCnMwAO5Rztcs6K0la9UkiHiJlSpDHNANC2frLHiFg03NwyACrs\n0qQgbRyfArU8U6lNnMpUVCAN7rDLXlKyGAPIrr2Fcw8+2mlzVr3KvAhwcfWa\ne/n9\r\n=oYjQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICoE2erk2aa4N684Yz0laFlnHHkq6DVDFwphDndujT2ZAiATwp+H55U1WtDE9+FJ9c9AWWvDAgpjMAvfyS6esZuwWw=="}]},"maintainers":[{"name":"ianmitchell","email":"ian.mitchel1@live.com"}],"_npmUser":{"name":"ianmitchell","email":"ian.mitchel1@live.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/users_0.0.1_1587412998969_0.1456147946416655"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-20T20:03:18.208Z","0.0.1":"2020-04-20T20:03:19.158Z","modified":"2022-04-04T15:13:57.087Z"},"maintainers":[{"name":"ianmitchell","email":"ian.mitchel1@live.com"}],"description":"User helper methods for Discord","homepage":"https://github.com/ianmitchell/aquarius","keywords":["discord","discord.js","bot","node","aquarius"],"repository":{"type":"git","url":"git+ssh://git@github.com/ianmitchell/aquarius.git","directory":"packages/users"},"author":{"name":"Ian Mitchell","email":"ian.mitchel1@live.com"},"bugs":{"url":"https://github.com/ianmitchell/aquarius/issues"},"license":"MIT","readme":"# @aquarius-bot/users\n\nProvides several helper methods for working with discord.js users.\n\n## Usage\n\nInstall:\n\n```\nnpm i @aquarius-bot/users\n```\n\n## API\n\n### getNickname\n\nGets the nickname for a User in a Guild. If the user doesn't have one, it returns their regular name.\n\n**Example**\n\n```javascript\nimport Discord from 'discord.js';\nimport { getNickname } from '@aquarius-bot/users';\n\nconst client = new Discord.Client();\n\nclient.on('message', (message) => {\n  const nickname = getNickname(message.guild, message.author);\n  message.reply(`Thanks for sending a message ${nickname}!`);\n});\n```\n\n### isBot\n\nDetermines if a user is a bot or not.\n\n**Example**\n\n```javascript\nimport Discord from 'discord.js';\nimport { isBot } from '@aquarius-bot/users';\n\nconst client = new Discord.Client();\n\nclient.on('message', (message) => {\n  if (isBot(message.author)) {\n    message.reply('You are a bot!');\n  }\n});\n```\n\n### isStreaming\n\nDetermines if a user is streaming or not. Note that this takes a presence and not a user object; this allows it to check against previous presences and not just the current one.\n\n**Example**\n\n```javascript\nimport Discord from 'discord.js';\nimport { isStreaming } from '@aquarius-bot/users';\n\nconst client = new Discord.Client();\n\nclient.on('presenceUpdate', (oldPresence, newPresence) => {\n  if (!isStreaming(oldPresence) && isStreaming(newPresence)) {\n    console.log(`${oldPresence.user} is now streaming!`);\n  }\n});\n```\n","readmeFilename":"README.md"}