mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix location of toString for channels (#2202)
This commit is contained in:
@@ -52,6 +52,17 @@ class Channel extends Base {
|
|||||||
return new Date(this.createdTimestamp);
|
return new Date(this.createdTimestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
|
||||||
|
* @returns {string}
|
||||||
|
* @example
|
||||||
|
* // Logs: Hello from <#123456789012345678>!
|
||||||
|
* console.log(`Hello from ${channel}!`);
|
||||||
|
*/
|
||||||
|
toString() {
|
||||||
|
return `<#${this.id}>`;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes this channel.
|
* Deletes this channel.
|
||||||
* @returns {Promise<Channel>}
|
* @returns {Promise<Channel>}
|
||||||
|
|||||||
@@ -489,17 +489,6 @@ class GuildChannel extends Channel {
|
|||||||
return MessageNotificationTypes[3];
|
return MessageNotificationTypes[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
|
|
||||||
* @returns {string}
|
|
||||||
* @example
|
|
||||||
* // Logs: Hello from <#123456789012345678>!
|
|
||||||
* console.log(`Hello from ${channel}!`);
|
|
||||||
*/
|
|
||||||
toString() {
|
|
||||||
return `<#${this.id}>`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = GuildChannel;
|
module.exports = GuildChannel;
|
||||||
|
|||||||
Reference in New Issue
Block a user