mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-10 04:01:37 +02:00
Merge Player and Queue services
This commit is contained in:
parent
646f030781
commit
9c91ce1a13
21 changed files with 236 additions and 255 deletions
|
@ -60,10 +60,16 @@ export default class {
|
|||
}
|
||||
|
||||
async stop(str = 'u betcha'): Promise<Message> {
|
||||
const wasAlreadyStopped = this.isStopped;
|
||||
|
||||
this.isStopped = true;
|
||||
|
||||
if (str) {
|
||||
await Promise.all([this.msg.reactions.removeAll(), this.msg.edit(str)]);
|
||||
if (wasAlreadyStopped) {
|
||||
await this.msg.edit(str);
|
||||
} else {
|
||||
await Promise.all([this.msg.reactions.removeAll(), this.msg.edit(str)]);
|
||||
}
|
||||
} else {
|
||||
await this.msg.reactions.removeAll();
|
||||
}
|
||||
|
|
|
@ -13,3 +13,5 @@ export const prettyTime = (seconds: number): string => {
|
|||
|
||||
return res;
|
||||
};
|
||||
|
||||
export const parseTime = (str: string): number => str.split(':').reduce((acc, time) => (60 * acc) + parseInt(time, 10), 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue