MCPcopy
hub / github.com/eritislami/evobot / stop

Method stop

structs/MusicQueue.ts:148–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146 }
147
148 public stop() {
149 if (this.stopped) return;
150
151 this.stopped = true;
152 this.loop = false;
153 this.songs = [];
154 this.player.stop();
155
156 !config.PRUNING && this.textChannel.send(i18n.__("play.queueEnded")).catch(console.error);
157
158 if (this.waitTimeout !== null) return;
159
160 this.waitTimeout = setTimeout(() => {
161 if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {
162 try {
163 this.connection.destroy();
164 } catch {}
165 }
166 bot.queues.delete(this.interaction.guild!.id);
167
168 !config.PRUNING && this.textChannel.send(i18n.__("play.leaveChannel"));
169 }, config.STAY_TIME * 1000);
170 }
171
172 /**
173 * Processes the song queue for playback. This method checks if the queue is locked or if the player

Callers 7

constructorMethod · 0.95
processQueueMethod · 0.95
executeFunction · 0.80
executeFunction · 0.80
executeFunction · 0.80
executeFunction · 0.80
sendPlayingMessageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected