docs: update outdated examples (#8081)

This commit is contained in:
Almeida
2022-06-13 17:18:15 +01:00
committed by GitHub
parent 552ec72542
commit 51eadf3737
2 changed files with 4 additions and 3 deletions

View File

@@ -48,12 +48,12 @@ class GuildStickerManager extends CachedManager {
* @returns {Promise<Sticker>} The created sticker * @returns {Promise<Sticker>} The created sticker
* @example * @example
* // Create a new sticker from a URL * // Create a new sticker from a URL
* guild.stickers.create('https://i.imgur.com/w3duR07.png', 'rip', 'headstone') * guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' })
* .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`)) * .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
* .catch(console.error); * .catch(console.error);
* @example * @example
* // Create a new sticker from a file on your computer * // Create a new sticker from a file on your computer
* guild.stickers.create('./memes/banana.png', 'banana', 'banana') * guild.stickers.create({ file: './memes/banana.png', name: 'banana', tags: 'banana' })
* .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`)) * .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
* .catch(console.error); * .catch(console.error);
*/ */

View File

@@ -356,7 +356,8 @@ class TextBasedChannel {
* @returns {Promise<Webhook>} Returns the created Webhook * @returns {Promise<Webhook>} Returns the created Webhook
* @example * @example
* // Create a webhook for the current channel * // Create a webhook for the current channel
* channel.createWebhook('Snek', { * channel.createWebhook({
* name: 'Snek',
* avatar: 'https://i.imgur.com/mI8XcpG.jpg', * avatar: 'https://i.imgur.com/mI8XcpG.jpg',
* reason: 'Needed a cool new Webhook' * reason: 'Needed a cool new Webhook'
* }) * })