Compare commits

..

No commits in common. "12289bbee97bd8a7f6a2a6e3e19c09d0108d54fc" and "c0a02c5d7252aa6ee4199d0bef2a9fe3bdb7c92c" have entirely different histories.

2 changed files with 16 additions and 30 deletions

View file

@ -17,7 +17,7 @@ specifiers:
dependencies:
'@ctrl/tinycolor': 3.4.1
'@projectdysnomia/dysnomia': github.com/projectdysnomia/dysnomia/10021c901a6114c967cd604579cbd4876d2bcbd7
'@projectdysnomia/dysnomia': github.com/projectdysnomia/dysnomia/0df1369a822dba8851c667b22d5bac34f4e849e6
better-ytdl-core: 1.0.1
dumpy: github.com/Cynosphere/dumpy.js/5fc22353cdcb97084bab572266390e780d9f7a7b
google-images: 2.1.0
@ -2437,31 +2437,11 @@ packages:
- encoding
dev: false
github.com/projectdysnomia/dysnomia/10021c901a6114c967cd604579cbd4876d2bcbd7:
resolution: {tarball: https://codeload.github.com/projectdysnomia/dysnomia/tar.gz/10021c901a6114c967cd604579cbd4876d2bcbd7}
github.com/projectdysnomia/dysnomia/0df1369a822dba8851c667b22d5bac34f4e849e6:
resolution: {tarball: https://codeload.github.com/projectdysnomia/dysnomia/tar.gz/0df1369a822dba8851c667b22d5bac34f4e849e6}
name: '@projectdysnomia/dysnomia'
version: 0.2.0-dev
version: 0.1.0-dev
engines: {node: '>=10.4.0'}
peerDependencies:
'@discordjs/opus': ^0.9.0
erlpack: github:discord/erlpack || github:abalabahaha/erlpack
eventemitter3: ^5.0.0
pako: ^2.1.0
sodium-native: ^4.0.1
zlib-sync: ^0.1.8
peerDependenciesMeta:
'@discordjs/opus':
optional: true
erlpack:
optional: true
eventemitter3:
optional: true
pako:
optional: true
sodium-native:
optional: true
zlib-sync:
optional: true
dependencies:
ws: 8.12.0
optionalDependencies:

View file

@ -113,7 +113,10 @@ async function getImage(msg, str) {
return `https://cdn.discordapp.com/emojis/${id}.png?v=1`;
} else if (/<@!?([0-9]*)>/.test(refMsg.content)) {
const id = refMsg.content.match(/<@!?([0-9]*)>/)[1];
const user = await hf.bot.requestHandler.request("GET", "/users/" + id);
const user = await hf.bot.rest.authRequest({
method: "GET",
path: "/users/" + id,
});
if (user)
return `https://cdn.discordapp.com/avatars/${id}/${user.avatar}.png?size=1024`;
}
@ -133,7 +136,10 @@ async function getImage(msg, str) {
return `https://cdn.discordapp.com/emojis/${id}.png?v=1`;
} else if (/<@!?([0-9]*)>/.test(str)) {
const id = str.match(/<@!?([0-9]*)>/)[1];
const user = await hf.bot.requestHandler.request("GET", "/users/" + id);
const user = await hf.bot.rest.authRequest({
method: "GET",
path: "/users/" + id,
});
if (user)
return `https://cdn.discordapp.com/avatars/${id}/${user.avatar}.png?size=1024`;
} else if (img) {
@ -271,10 +277,10 @@ async function selectionMessage(
async function lookupUser(msg, str, filter) {
if (/[0-9]{17,21}/.test(str)) {
return await hf.bot.requestHandler.request(
"GET",
"/users/" + str.match(/([0-9]{17,21})/)[1]
);
return await hf.bot.rest.authRequest({
method: "GET",
path: "/users/" + str.match(/([0-9]{17,21})/)[1],
});
}
let users;