Add heart effect (#6188)

* add heart effect

* clean up syntax

* convert indentation to spaces

* appease the linter

* hopefully resolve merge conflict

* add missing semicolons

* add label to toggle switch

* Revert "add label to toggle switch"

This reverts commit 5e83d9b9109f5f1922555484f7492596cc5966ff.

* remove extra space

* replace gift heart with emoji heart in timeline message

* reduce number of emoji triggers

* copyright should be myself

* Update src/effects/index.ts

Co-authored-by: ColonisationCaptain <52425971+ColonisationCaptain@users.noreply.github.com>
Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
This commit is contained in:
CicadaCinema 2022-04-08 22:31:04 +01:00 committed by GitHub
parent 579a166113
commit cdb0c2c6a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 205 additions and 1 deletions

View file

@ -21,6 +21,7 @@ import { FireworksOptions } from "./fireworks";
import { RainfallOptions } from "./rainfall";
import { SnowfallOptions } from "./snowfall";
import { SpaceInvadersOptions } from "./spaceinvaders";
import { HeartOptions } from "./hearts";
/**
* This configuration defines room effects that can be triggered by custom message types and emojis
@ -85,5 +86,15 @@ export const CHAT_EFFECTS: Array<Effect<{ [key: string]: any }>> = [
gravity: 0.01,
},
} as Effect<SpaceInvadersOptions>,
{
emojis: ["💝"],
msgType: "io.element.effect.hearts",
command: "hearts",
description: () => _td("Sends the given message with hearts"),
fallbackMessage: () => _t("sends hearts") + " 💝",
options: {
maxCount: 120,
gravity: 3.2,
},
} as Effect<HeartOptions>,
];