diff --git a/src/Player.js b/src/Player.js index 92dc9e3..6491fd9 100644 --- a/src/Player.js +++ b/src/Player.js @@ -339,6 +339,26 @@ class Player { * @param {Discord.Snowflake} guildID * @param {Boolean} enabled Whether the repeat mode should be enabled * @returns {Promise} + * + * @example + * client.on('message', async (message) => { + * const args = message.content.slice(settings.prefix.length).trim().split(/ +/g); + * const command = args.shift().toLowerCase(); + * + * if(command === 'repeat-mode'){ + * const repeatModeEnabled = client.player.getQueue(message.guild.id).repeatMode; + * if(repeatModeEnabled){ + * // if the repeat mode is currently enabled, disable it + * client.player.setRepeatMode(message.guild.id, false); + * message.channel.send("Repeat mode disabled! The current song will no longer be played again and again..."); + * } else { + * // if the repeat mode is currently disabled, enable it + * client.player.setRepeatMode(message.guild.id, true); + * message.channel.send("Repeat mode enabled! The current song will be played again and again until you run the command again!"); + * } + * } + * + * }); */ setRepeatMode (guildID, enabled) { return new Promise((resolve, reject) => {