2020-10-21 14:29:25 +02:00
|
|
|
import { _t, _td } from "../../../../languageHandler";
|
2020-10-21 13:37:36 +02:00
|
|
|
|
2020-10-21 17:58:54 +02:00
|
|
|
export type Effect = {
|
2020-10-21 13:56:58 +02:00
|
|
|
emojis: Array<string>;
|
|
|
|
|
msgType: string;
|
|
|
|
|
command: string;
|
|
|
|
|
description: () => string;
|
|
|
|
|
fallbackMessage: () => string;
|
2020-10-21 17:58:54 +02:00
|
|
|
options: {
|
|
|
|
|
[key: string]: any
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ConfettiOptions = {
|
|
|
|
|
maxCount: number,
|
|
|
|
|
speed: number,
|
|
|
|
|
frameInterval: number,
|
|
|
|
|
alpha: number,
|
|
|
|
|
gradient: boolean,
|
2020-10-21 13:56:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const effects: Array<Effect> = [
|
2020-10-21 13:37:36 +02:00
|
|
|
{
|
|
|
|
|
emojis: ['🎊', '🎉'],
|
|
|
|
|
msgType: 'nic.custom.confetti',
|
|
|
|
|
command: 'confetti',
|
|
|
|
|
description: () => _td("Sends the given message with confetti"),
|
|
|
|
|
fallbackMessage: () => _t("sends confetti") + " 🎉",
|
2020-10-21 17:58:54 +02:00
|
|
|
options: {
|
|
|
|
|
//set max confetti count
|
|
|
|
|
maxCount: 150,
|
|
|
|
|
//syarn addet the particle animation speed
|
|
|
|
|
speed: 3,
|
|
|
|
|
//the confetti animation frame interval in milliseconds
|
|
|
|
|
frameInterval: 15,
|
|
|
|
|
//the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible)
|
|
|
|
|
alpha: 1.0,
|
|
|
|
|
//use gradient instead of solid particle color
|
|
|
|
|
gradient: false,
|
|
|
|
|
} as ConfettiOptions,
|
2020-10-21 13:37:36 +02:00
|
|
|
},
|
2020-10-21 13:56:58 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export default effects;
|
|
|
|
|
|
|
|
|
|
|