Update readme, attempt some things, update packages

This commit is contained in:
Essem 2022-11-26 13:31:40 -06:00
parent ed8ec36136
commit 3ed65c3c86
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
10 changed files with 91 additions and 74 deletions

View file

@ -17,7 +17,7 @@ class ChannelCommand extends Command {
if (this.args[1]?.match(/^<?[@#]?[&!]?\d+>?$/) && this.args[1] >= 21154535154122752n) {
const id = this.args[1].replaceAll("@", "").replaceAll("#", "").replaceAll("!", "").replaceAll("&", "").replaceAll("<", "").replaceAll(">", "");
if (guildDB.disabled.includes(id)) return "I'm already disabled in this channel!";
channel = this.guild.channels.get(id);
channel = this.guild.channels.get(id) ?? await this.client.rest.channels.get(id);
} else {
if (guildDB.disabled.includes(this.channel.id)) return "I'm already disabled in this channel!";
channel = this.channel;
@ -31,7 +31,7 @@ class ChannelCommand extends Command {
if (this.args[1]?.match(/^<?[@#]?[&!]?\d+>?$/) && this.args[1] >= 21154535154122752n) {
const id = this.args[1].replaceAll("@", "").replaceAll("#", "").replaceAll("!", "").replaceAll("&", "").replaceAll("<", "").replaceAll(">", "");
if (!guildDB.disabled.includes(id)) return "I'm not disabled in that channel!";
channel = this.guild.channels.get(id);
channel = this.guild.channels.get(id) ?? await this.client.rest.channels.get(id);
} else {
if (!guildDB.disabled.includes(this.channel.id)) return "I'm not disabled in this channel!";
channel = this.channel;

View file

@ -6,7 +6,7 @@ import { getServers } from "../../utils/misc.js";
class InfoCommand extends Command {
async run() {
let owner = this.client.users.get(process.env.OWNER.split(",")[0]);
if (!owner) owner = await this.client.getRESTUser(process.env.OWNER.split(",")[0]);
if (!owner) owner = await this.client.rest.users.get(process.env.OWNER.split(",")[0]);
const servers = await getServers(this.client);
await this.acknowledge();
return {

View file

@ -18,7 +18,7 @@ class HostCommand extends MusicCommand {
user = getUser;
} else if (input.match(/^<?[@#]?[&!]?\d+>?$/) && input >= 21154535154122752n) {
try {
user = await this.client.getRESTUser(input);
user = await this.client.rest.users.get(input);
} catch {
// no-op
}

View file

@ -30,7 +30,7 @@ class NowPlayingCommand extends MusicCommand {
},
{
name: "💬 Channel",
value: this.guild.channels.get(this.member.voiceState.channelID).name
value: (this.guild.channels.get(this.member.voiceState.channelID) ?? await this.client.rest.channels.get(this.member.voiceState.channelID)).name
},
{
name: "🌐 Node",

View file

@ -48,7 +48,7 @@ class TagsCommand extends Command {
this.success = true;
if (!user) {
try {
const restUser = await this.client.getRESTUser(getResult.author);
const restUser = await this.client.rest.users.get(getResult.author);
return `This tag is owned by **${restUser.username}#${restUser.discriminator}** (\`${getResult.author}\`).`;
} catch {
return `I couldn't find exactly who owns this tag, but I was able to get their ID: \`${getResult.author}\``;