mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-12 21:05:29 +01:00
Remove custom getter
This commit is contained in:
parent
4364f459be
commit
847c578b5d
|
@ -40,7 +40,8 @@ export default class implements Command {
|
|||
|
||||
public async execute(msg: Message, args: string[]): Promise<void> {
|
||||
const [targetVoiceChannel] = getMemberVoiceChannel(msg.member!) ?? getMostPopularVoiceChannel(msg.guild!);
|
||||
const playlistLimit = await this.getPlaylistLimit(msg.guild!.id);
|
||||
const settings = await Settings.findByPk(msg.guild!.id);
|
||||
const {playlistLimit} = settings!;
|
||||
|
||||
const res = new LoadingMessage(msg.channel as TextChannel);
|
||||
await res.start();
|
||||
|
@ -169,9 +170,4 @@ export default class implements Command {
|
|||
await player.play();
|
||||
}
|
||||
}
|
||||
|
||||
private async getPlaylistLimit(guildId: string) {
|
||||
const settings = await Settings.findByPk(guildId);
|
||||
return settings?.playlistLimit ?? 50;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue