mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
docs: improve examples (master branch) (#2209)
* docs: improve examples * more improvements fix maybe this another example collectors * stuff
This commit is contained in:
@@ -514,6 +514,11 @@ class Guild extends Base {
|
||||
* @param {UserResolvable} [options.user] Only show entries involving this user
|
||||
* @param {AuditLogAction|number} [options.type] Only show entries involving this action type
|
||||
* @returns {Promise<GuildAuditLogs>}
|
||||
* @example
|
||||
* // Output audit log entries
|
||||
* guild.fetchAuditLogs()
|
||||
* .then(audit => console.log(audit.entries))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
fetchAuditLogs(options = {}) {
|
||||
if (options.before && options.before instanceof GuildAuditLogs.Entry) options.before = options.before.id;
|
||||
@@ -921,8 +926,8 @@ class Guild extends Base {
|
||||
* @returns {Promise<GuildChannel>}
|
||||
* @example
|
||||
* // Create a new text channel
|
||||
* guild.createChannel('new-general', { reason: 'My reason here.' })
|
||||
* .then(channel => console.log(`Created new channel ${channel}`))
|
||||
* guild.createChannel('new-general', { reason: 'Cool new channel' })
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
*/
|
||||
createChannel(name, { type, nsfw, bitrate, userLimit, parent, overwrites, reason } = {}) {
|
||||
|
||||
Reference in New Issue
Block a user