Update readme, attempt some things, update packages
This commit is contained in:
parent
ed8ec36136
commit
3ed65c3c86
10 changed files with 91 additions and 74 deletions
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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}\``;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue