Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Crow08/discord-uberbot
/ functions
Functions
217 in github.com/Crow08/discord-uberbot
⨍
Functions
217
◇
Types & classes
30
↓ 104 callers
Method
simpleNote
* Send a simple note to Discord with an emoji depending of the given message Type. * @param {ChatInputCommandInteraction} interaction - User messag
src/ChatService.js:31
↓ 10 callers
Method
init
(mongoUrl, username, password)
src/DBService.js:10
↓ 9 callers
Method
getAudioPlayer
(interaction)
src/PlayerService.js:248
↓ 8 callers
Method
getVoiceConnection
* Establish new voice connection. * If a connection is already established disconnect first. * @param {ChatInputCommandInteraction} interaction
src/VoiceService.js:71
↓ 8 callers
Method
play
* Start playing if the playback ist stopped or resume playback if paused. * @param {ChatInputCommandInteraction} interaction - User message the pla
src/PlayerService.js:162
↓ 8 callers
Method
send
* Send either plain text or a MessageEmbed in markdown style. * @see {@link https://discord.js.org/#/docs/main/master/class/MessageEmbed} MessageEm
src/ChatService.js:66
↓ 7 callers
Method
stop
* Stop playback. * @param {ChatInputCommandInteraction} interaction - User message the playback was is invoked by.
src/PlayerService.js:194
↓ 5 callers
Method
announceMessage
* Announce the given message via tts to the given connection. * @param {string} message Message to announce. * @param {VoiceConnection} voiceCon
src/TTSService.js:120
↓ 5 callers
Method
getSongsViaSearchQuery
* Get songs via query. * @param {string} searchString - Url to get song from. * @param {number} count - Number of songs to be fetched. * @ret
src/YouTubeService.js:73
↓ 5 callers
Method
pagedContent
* Display paged content with reaction based navigation. * @param {ChatInputCommandInteraction} interaction - User message this function is invoked
src/ChatService.js:82
↓ 4 callers
Method
addSong
* Add a song to a playlist and save it to MongoDB. * If the playlist doesn't exist it will be created. * @param {Song} song - song to be added.
src/DBService.js:94
↓ 4 callers
Method
buildDummyMessage
* Build a dummy message to prevent crashes when executing commands from the console. * @private
src/ChatService.js:406
↓ 4 callers
Method
debugPrint
* Print color coded debug information for all chat interactions to console log. * @private * @param {string|Object|Error} content Content to be
src/ChatService.js:392
↓ 4 callers
Method
getPlaylist
* Get all songs of a playlist as array. * @param {string} plName - Playlist name to get songs from. * @returns {Promise<Song[]>} - Array of all
src/DBService.js:223
↓ 4 callers
Method
getSongViaUrl
* Get song via url. * @param {string} searchString - Url to get song from. * @returns {Promise<Song>} - Song from url.
src/YouTubeService.js:24
↓ 4 callers
Method
getStream
* Resolve the streaming source of a Song and get the stream accordingly as a promise. * @private * @param {Song} song song to get the Stream fro
src/VoiceService.js:111
↓ 4 callers
Method
playNext
* Play the next song from the queue. * @private * @param {ChatInputCommandInteraction} interaction - User message the playback was is invoked b
src/PlayerService.js:143
↓ 4 callers
Method
querySearch
* Do a direct query search skipping checks for urls. * @param {string} payload - Payload containing song query. * @param {number} count - Count
src/SearchService.js:67
↓ 4 callers
Method
search
* Search for a song using urls or queries on the preferred source and fallbacks. * @param {string} payload - Payload containing song url or query.
src/SearchService.js:28
↓ 3 callers
Method
addMultipleFairlyToQueue
* Add multiple songs fairly to the queue. * Songs from requester with viewer songs gets added farther ahead in queue. * The resulting queue from
src/QueueService.js:133
↓ 3 callers
Function
buildRow
(text)
src/tools/createCmdTable.js:101
↓ 3 callers
Method
findSong
* Find a song by title in a playlist with fuzzy search. * @param {string} title - query to search titles with. * @param {string} plName - playli
src/DBService.js:191
↓ 3 callers
Method
getCurrentSong
* Get current Song which is position 0 of the history. * @returns {Promise<Song>} - The current song.
src/QueueService.js:35
↓ 3 callers
Method
getSongsFromYtThenSc
* Do Search from Youtube then SoundCloud. * @private * @param {string} searchString - Payload containing song query. * @param {number} count
src/SearchService.js:203
↓ 3 callers
Method
getSongsViaPlaylistUrl
* Get songs via playlist url. * @param {string} searchString - Url to get song from. * @returns {Promise<Song[]>} - Songs from playlist url.
src/YouTubeService.js:43
↓ 3 callers
Method
playNow
* Play the given song immediately. * If another song is already playing it ends immediately. * @param {Song} song - Song to be played. * @par
src/PlayerService.js:42
↓ 3 callers
Function
prioritizeSong
(songNumber)
src/cmd/Command_play_next.js:9
↓ 3 callers
Method
remove
* Remove the given position from the queue. * @param {number} position - position to remove.
src/QueueService.js:150
↓ 3 callers
Method
shuffleQueue
* Shuffles the current queue.
src/QueueService.js:157
↓ 3 callers
Method
skip
* Skip current song. * @param {ChatInputCommandInteraction} interaction - User message the playback was is invoked by.
src/PlayerService.js:209
↓ 3 callers
Method
updatePlayer
* Display a song in pretty markdown and add reaction based user rating. * @param {ChatInputCommandInteraction} interaction- User message this funct
src/ChatService.js:170
↓ 2 callers
Method
addFairlyToQueue
* Add a song fairly to the queue. * Songs from requester with viewer songs gets added farther ahead in queue. * The resulting queue from only fa
src/QueueService.js:107
↓ 2 callers
Function
addPage
(listText, pages, songs)
src/cmd/Command_list_songs.js:10
↓ 2 callers
Function
addPage
()
src/cmd/Command_show_history.js:10
↓ 2 callers
Function
addPage
()
src/cmd/Command_show_queue.js:10
↓ 2 callers
Function
addPage
()
src/cmd/Command_search.js:24
↓ 2 callers
Function
buildRow
(text)
src/cmd/Command_help.js:45
↓ 2 callers
Method
formattedDate
()
src/TTSService.js:140
↓ 2 callers
Method
getAutoPL
* Gets the current auto playlist name. * @returns {Promise<string>} - current auto playlist name.
src/QueueService.js:199
↓ 2 callers
Method
getRatingEmojis
* Function to get a tuple of voting emoji names and IDs with defaults (👍/👎). * @todo make custom emojis configurable. * @private * @param {Ch
src/ChatService.js:264
↓ 2 callers
Method
handleRatingReaction
* Process reaction based user rating. * @private * @param {ChatInputCommandInteraction} interaction - given user reaction. * @param {number}
src/ChatService.js:336
↓ 2 callers
Function
handleRemove
(song, plName, interaction)
src/cmd/Command_pl_remove.js:12
↓ 2 callers
Method
htmlUnescape
* Unescape html escaped characters. * @private * @param {string} str string possibly containing html escaped characters.
src/YouTubeService.js:151
↓ 2 callers
Method
joinVoice
(guild, channel)
src/ClientService.js:85
↓ 2 callers
Method
listPlaylists
* Gets all playlist names as string. * @returns {Promise<string[]>} - Array containing all playlist names.
src/DBService.js:277
↓ 2 callers
Method
loadPlaylist
* Adds the given playlist from the DB to the current queue. * @param {string} plName - playlist name to load. * * @param {ChatInputCommandInt
src/QueueService.js:166
↓ 2 callers
Method
pause
* Pause playback. * @param {ChatInputCommandInteraction} interaction - User message the playback was is invoked by.
src/PlayerService.js:178
↓ 2 callers
Method
phoneticNicknameFor
* Lookup phonetic nickname. * @private * @param {string} userName Username to process.
src/TTSService.js:104
↓ 2 callers
Function
playSfx
(sfxIndex, voiceConnection)
src/cmd/Command_sfx.js:31
↓ 2 callers
Method
playStream
* Plays stream from the given song and return ste stream dispatcher. * @param audioPlayer * @param {Song} song song to be played * @param {Ch
src/VoiceService.js:36
↓ 2 callers
Method
rateSong
* Rate a song up or down and handle cooldown and other implications like adding or removing the song. * Special cases: * Upvoted and rating is h
src/RatingService.js:24
↓ 2 callers
Method
rebuildPlayer
* (Re-) builds the player with controls. * Can be used to move the player down in chat. * @param {ChatInputCommandInteraction} interaction - Use
src/PlayerService.js:64
↓ 2 callers
Method
removeSong
* Remove song from playlist. * If it was the last song of the playlist the playlist and MongoDB collection will be removed. * @param {Song} song
src/DBService.js:139
↓ 2 callers
Method
shuffle
* Shuffles the given array and returns it. * @private * @param {Array} array - array to be shuffled * @returns {Array} - shuffled array.
src/QueueService.js:222
↓ 1 callers
Method
addBtnListener
* Add Reaction controls to player and refreshes listener recursively until message is destroyed. * @private * @param {ChatInputCommandInteractio
src/ChatService.js:226
↓ 1 callers
Method
addSongToHistory
* Add a song to the top of the history. * Add a song at position 0 and trim the history if its longer than its max size. * @param {Song} song -
src/QueueService.js:82
↓ 1 callers
Method
addSongs
* Add multiple songs to a playlist and save it to MongoDB. * If the playlist doesn't exist it will be created. * The playlist is represented as
src/DBService.js:116
↓ 1 callers
Method
autoChoose
* Automatically pick a song from a list of songs based on some disfavored strings. * Disfavored:["cover", "live", "remix", "mix", "parody", "hour",
src/YouTubeService.js:134
↓ 1 callers
Method
back
* Play last song again. * @param {ChatInputCommandInteraction} interaction - User message the playback was is invoked by.
src/PlayerService.js:222
↓ 1 callers
Method
buildReactionFunctions
* Build object for reaction based player functions. * @private * @param {ChatInputCommandInteraction} interaction - User message the playback wa
src/PlayerService.js:80
↓ 1 callers
Method
buildSongEmbed
* Build a MessageEmbed for a song with markdown. * @private * @param {Song} song - Song to be displayed.
src/ChatService.js:361
↓ 1 callers
Method
checkAndAddToAutoPL
* Add song to auto playlist. * @private * @param {Song} song - Song to be Added. * @param delta - Delta rating score.
src/RatingService.js:85
↓ 1 callers
Method
clearQueue
* Clear the current queue.
src/QueueService.js:142
↓ 1 callers
Method
connectDB
* Connection to MongoDB. * If a connection is already established disconnect first.
src/DBService.js:35
↓ 1 callers
Method
createAudioResource
* Creates an AudioResource from Song.
src/VoiceService.js:135
↓ 1 callers
Method
deletePlaylist
* Delete an entire playlist and the corresponding MongoBD collection. * @param {string} plName - playlist name to be removed.
src/DBService.js:264
↓ 1 callers
Method
disconnectDB
* Disconnect from MongoDB.
src/DBService.js:76
↓ 1 callers
Method
disconnectVoiceConnection
* Disconnect current voice connection. * @param {ChatInputCommandInteraction} interaction - User message this function is invoked by.
src/VoiceService.js:58
↓ 1 callers
Method
escapeRegExp
* Escape all regex characters from string. * @private * @param {string} text - text with with some regex characters.
src/DBService.js:27
↓ 1 callers
Method
getAudioResource
* Get text to Speech stream for given text. * @param {string} text text to convert
src/TTSService.js:24
↓ 1 callers
Method
getHistorySong
* Gets a specific song from the history with its position. * 0 ist the song least added to the history. * @param {number} position - Index of hi
src/QueueService.js:95
↓ 1 callers
Method
getPlayerMsg
(interaction)
src/ChatService.js:142
↓ 1 callers
Function
getRandomInt
(max)
src/cmd/Command_walrus.js:7
↓ 1 callers
Function
getRandomInt
(max)
src/cmd/Command_villager.js:7
↓ 1 callers
Method
getRandomSong
* Get a random Song from a Playlist. * @param {string} plName - playlist name to get the song from. * @returns {Promise<Song>} - A random Song f
src/DBService.js:244
↓ 1 callers
Function
getSfxAudioResource
(index)
src/cmd/Command_sfx.js:22
↓ 1 callers
Function
getSfxUrl
(payload)
src/cmd/Command_sfx.js:8
↓ 1 callers
Method
getSongsFromScThenYt
* Do Search from SoundCloud then Youtube. * @private * @param {string} searchString - Payload containing song query. * @param {number} count
src/SearchService.js:224
↓ 1 callers
Method
getSongsFromSpThenYtThenSc
* Do Search from Spotify the Youtube then SoundCloud. * Spotify is only for searching and to get the exact song title and artist. * @private
src/SearchService.js:246
↓ 1 callers
Method
getUserCdForSong
* Get current rating cooldown by song and user. * @private * @param {Song} song - Song to be rated. * @param {string} user - User name rating
src/RatingService.js:69
↓ 1 callers
Method
handleBtnAction
(interaction, song, downVoteEmojiName, upVoteEmojiName, reactionFunctions)
src/ChatService.js:241
↓ 1 callers
Method
handleError
* Called when an error has occurred during playback. * @param {Error} err - Error caused by playback. * @param {ChatInputCommandInteraction} int
src/PlayerService.js:32
↓ 1 callers
Method
handleRawFileUrl
* Helper function to handle raw file urls. * @private * @param {string} searchString - Payload containing a link to a raw song file.
src/SearchService.js:189
↓ 1 callers
Method
handleReaction
* Process reactions. * @private * @param {function} processFunction - Function to be invoked if rating was given.
src/ChatService.js:352
↓ 1 callers
Method
handleSongEnd
* Called when a song has ended. and starting the next song from queue oe auto playlist when available. * @private * @param {ChatInputCommandInte
src/PlayerService.js:23
↓ 1 callers
Method
handleSoundCloudUrl
* Helper function to handle SoundCloud urls. * @private * @param {string} searchString - Payload containing a SoundCloud track url.
src/SearchService.js:170
↓ 1 callers
Method
handleSpotifyUrl
* Helper function to handle Spotify urls. * @private * @param {string} searchString - Payload containing a Spotify track or playlist url. * @
src/SearchService.js:100
↓ 1 callers
Method
handleYouTubeUrl
* Helper function to handle Youtube urls. * @private * @param {string} searchString - Payload containing a Youtube track or playlist url.
src/SearchService.js:143
↓ 1 callers
Method
isVoiceConnected
* Check if a voice connection to the server of the message is established. * @param {ChatInputCommandInteraction} interaction - User message this
src/VoiceService.js:95
↓ 1 callers
Method
mergePlaylists
* Merge two playlists by copying one into the other. * @param {string} source - name of the playlist to be copied from. * @param {string} target
src/DBService.js:291
↓ 1 callers
Method
playMultipleNow
* Given a Array of songs, play the first one immediately and queue the rest. * If another song is already playing it ends immediately. * @param
src/PlayerService.js:126
↓ 1 callers
Method
popNextSong
* Get next song which is position 0 of the queue. * @returns {Promise<Song>} - The next song.
src/QueueService.js:49
↓ 1 callers
Method
removeFromPL
* Remove Song from its playlist. * @private * @param {Song} song - Song to be removed.
src/RatingService.js:119
↓ 1 callers
Method
renamePL
* Rename a playlist with the given names. * The playlist and corresponding MongoDB collection will be removed. * @param {string} plName - playli
src/DBService.js:154
↓ 1 callers
Method
renameSong
* Rename the artist or title of a song in a playlist. * @param {string} plName - playlist name to change the name in. * @param {Song} song - Son
src/DBService.js:173
↓ 1 callers
Method
restart
* Play the current song again. * @param {ChatInputCommandInteraction} interaction - User message the playback was is invoked by.
src/PlayerService.js:242
↓ 1 callers
Function
run
(interaction)
src/cmd/Command_list_songs.js:7
↓ 1 callers
Function
run
(interaction)
src/cmd/Command_pl_add.js:6
↓ 1 callers
Function
run
(interaction)
src/cmd/Command_help.js:63
↓ 1 callers
Function
run
(interaction)
src/cmd/Command_show_history.js:7
next →
1–100 of 217, ranked by callers