This repository has been archived by the owner on Jun 18, 2022. It is now read-only.
generated from NamVr/DiscordBot-Template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a93378e
commit 5888998
Showing
18 changed files
with
1,307 additions
and
1,108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube add playlist event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "addList", | ||
|
||
/** | ||
* @description Executes the block of code when a playlist is added to the queue | ||
* @param {object} queue queue Object | ||
* @param {object} playlist playlist object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(queue, playlist, client) { | ||
const embed = new MessageEmbed() | ||
.setColor('#0099ff') | ||
.setTitle(`Added playlist [${playlist.name}](${playlist.url})`) | ||
.setDescription(`${playlist.tracks.length} tracks added`) | ||
.addField('Number of songs', playlist.songs.length) | ||
.setFooter(`Added by ${playlist.owner}`) | ||
.setTimestamp(); | ||
queue.textChannel.send({ embeds: [embed] }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube add Song event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "addSong", | ||
|
||
/** | ||
* @description Executes the block of code when a song is added to queue! | ||
* @param {Object} queue queue Object | ||
* @param {Object} song Song Object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(queue, song, client) { | ||
const emb = new MessageEmbed() | ||
.setTitle("Added Song to queue") | ||
.setColor("#BFFF00") | ||
.setDescription(`Song: [${song.name}](${song.url})`) | ||
.addField("Duration", song.formattedDuration, true) | ||
.setImage(song.thumbnail) | ||
.setFooter(`Requested by ${song.user.username}#${song.user.discriminator}`); | ||
queue.textChannel.send({ embeds: [emb] }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube empty event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "empty", | ||
|
||
/** | ||
* @description Executes the block of code when the voice channel is empty | ||
* @param {object} channel Channel Object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(channel, client) { | ||
const emb = new MessageEmbed() | ||
.setColor('#ff0000') | ||
.setTitle('🔇 Voice Channel Empty') | ||
.setDescription('The Voice channel is empty. Leaving the channel..') | ||
.setFooter("Hope you enjoyed your time.") | ||
.setTimestamp(); | ||
channel.textChannel.send({ embeds: [emb] }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube error event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "error", | ||
|
||
/** | ||
* @description Executes the block of code when an error occurs in distube | ||
* @param {object} channel Channel Object | ||
* @param {object} error Error Object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(channel, error, client) { | ||
const errEmb = new MessageEmbed() | ||
.setTitle("Error Ocurred") | ||
.setDescription(`${error.message}`) | ||
.setColor("#ff0000") | ||
.setFooter(`Contact <@!${client.owner}>`) | ||
.setTimestamp(); | ||
channel.send({ embeds: [errEmb] }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube finish event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "finish", | ||
|
||
/** | ||
* @description Executes the block of code when the queue finishes | ||
* @param {object} queue queue Object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(queue, client) { | ||
const emb = new MessageEmbed() | ||
.setColor('#0099ff') | ||
.setTitle('Finished') | ||
.setDescription(`Finished playing ${queue.songs[0].title}`) | ||
.setThumbnail(queue.songs[0].thumbnail) | ||
.setTimestamp(); | ||
queue.textChannel.send(emb); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube play Song event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "playSong", | ||
|
||
/** | ||
* @description Executes the block of code when a song is played! | ||
* @param {Object} queue queue Object | ||
* @param {Object} song Song Object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(queue, song, client) { | ||
const emb = new MessageEmbed() | ||
.setTitle("Playing Song") | ||
.setColor("#BFFF00") | ||
.setDescription(`Now Playing: [${song.name}](${song.url})`) | ||
.addField("Duration", song.formattedDuration, true) | ||
.setImage(song.thumbnail) | ||
.setFooter(`Requested by ${song.user.username}#${song.user.discriminator}`); | ||
queue.textChannel.send({ embeds: [emb] }); | ||
console.log(`Song Played: ${song.name} | ${song.url}`); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube searchCancel event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "searchCancel", | ||
|
||
/** | ||
* @description Executes the block of code when a search gets canceled. | ||
* @param {object} message message Object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(message, client) { | ||
const emb = new MessageEmbed() | ||
.setColor('#ff0000') | ||
.setTitle('Search Canceled') | ||
.setDescription('Search has been canceled.') | ||
.setTimestamp(); | ||
message.channel.send({ embeds: [emb] }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube search done event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "searchDone", | ||
|
||
/** | ||
* @description Executes the block of code when the Search is completed | ||
* @param {Object} message The users search response message | ||
* @param {Object} answer The answered message of user | ||
*/ | ||
execute(message, answer, client) { | ||
console.log("SEARCH COMPLETED") | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube Search Invalid response event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "searchInvalidAnswer", | ||
|
||
/** | ||
* @description Executes the block of code when the voice channel is empty | ||
* @param {object} message original message Object | ||
* @param {object} answer user answer message object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(message, answer, client) { | ||
const embed = new MessageEmbed() | ||
.setColor('#ff0000') | ||
.setTitle('Invalid answer') | ||
.setDescription('Please select a valid answer.') | ||
.setFooter('Please try again.'); | ||
message.channel.send({ embeds: [embed] }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
|
||
/** | ||
* @file disTube searchNoResult event. | ||
* @author Vachan MN | ||
* @since 1.0.0 | ||
*/ | ||
|
||
module.exports = { | ||
name: "searchNoResult", | ||
|
||
/** | ||
* @description Executes the block of code when an there are no results for a search | ||
* @param {object} message message Object | ||
* @param {Object} client Main Application Client | ||
*/ | ||
execute(message, client) { | ||
const emb = new MessageEmbed() | ||
.setColor('#ff0000') | ||
.setTitle('No Results Found') | ||
.setDescription('No results found for your search. Please try again.') | ||
.setTimestamp(); | ||
message.channel.send({ embeds: [emb] }); | ||
}, | ||
}; |
Oops, something went wrong.