Fix some permission checks, fix avatar URLs
This commit is contained in:
parent
888f2f8b4a
commit
49a60bba96
11 changed files with 22 additions and 19 deletions
|
@ -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!";
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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).`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue