mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 01:01:30 +00:00
fix location of toString for channels (#2202)
This commit is contained in:
parent
954a1c8d1a
commit
abb93c9eb9
2 changed files with 11 additions and 11 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue