Fix some permission checks, fix avatar URLs

This commit is contained in:
Essem 2022-09-23 23:50:59 -05:00
parent 888f2f8b4a
commit 49a60bba96
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
11 changed files with 22 additions and 19 deletions

View file

@ -54,7 +54,7 @@ class HelpCommand extends Command {
}
return embed;
} else {
if (this.guild && !this.channel.permissionsOf(this.client.user.id).has("EMBED_LINKS")) {
if (this.guild && !this.channel.permissionsOf(this.client.user.id.toString()).has("EMBED_LINKS")) {
this.success = false;
return "I don't have the `Embed Links` permission!";
}

View file

@ -8,7 +8,7 @@ import Command from "../../classes/command.js";
class ImageSearchCommand extends Command {
async run() {
this.success = false;
if (this.channel && !this.channel.permissionsOf(this.client.user.id).has("EMBED_LINKS")) return "I don't have the `Embed Links` permission!";
if (this.channel && !this.channel.permissionsOf(this.client.user.id.toString()).has("EMBED_LINKS")) return "I don't have the `Embed Links` permission!";
const query = this.options.query ?? this.args.join(" ");
if (!query || !query.trim()) return "You need to provide something to search for!";
await this.acknowledge();

View file

@ -8,7 +8,7 @@ class ImageStatsCommand extends Command {
embeds: [{
"author": {
"name": "esmBot Image Statistics",
"iconURL": this.client.user.avatarURL
"iconURL": this.client.user.avatarURL()
},
"color": 16711680,
"description": `The bot is currently connected to ${connections.size} image server(s).`,