Configurable voice channel leave behavior (#514)

Co-authored-by: Max Isom <hi@maxisom.me>
This commit is contained in:
Johannes Vääräkangas 2022-02-12 04:05:02 +02:00 committed by GitHub
parent 8e5b3cfa43
commit 4dbb55a721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 123 additions and 11 deletions

View file

@ -4,7 +4,7 @@ import {Except} from 'type-fest';
import shuffle from 'array-shuffle';
import {TYPES} from '../types.js';
import GetSongs from '../services/get-songs.js';
import {QueuedSong} from './player.js';
import {QueuedSong, STATUS} from './player.js';
import PlayerManager from '../managers/player.js';
import {prisma} from '../utils/db.js';
import {buildPlayingMessageEmbed} from '../utils/build-embed.js';
@ -131,6 +131,9 @@ export default class AddQueryToQueue {
await interaction.editReply({
embeds: [buildPlayingMessageEmbed(player)],
});
} else if (player.status === STATUS.IDLE) {
// Player is idle, start playback instead
await player.play();
}
// Build response message