add personalized welcome messages (untested SMILERS)

This commit is contained in:
2025-12-07 23:41:59 +01:00
parent 3aca8a9210
commit eb5cca7897
4 changed files with 63 additions and 9 deletions

View File

@@ -0,0 +1,26 @@
import PointRedeem from "pointRedeems";
import { sendMessage } from "lib/commandUtils";
import { redis } from "lib/redis";
export default new PointRedeem({
name: "setwelcomemsg",
cost: 15000,
title: "Set welcome message",
input: true,
color: "#0099FF",
prompt:
"Set your welcome message (echoed once per stream). Character limit is 200",
async execution(msg) {
if (msg.input.length > 200) {
await sendMessage(`Your desired welcome message is too long`);
if (process.env.NODE_ENV === "production")
await msg.updateStatus("CANCELED");
}
await Promise.all([
sendMessage(
`${msg.userDisplayName} successfully set their new welcome message`,
),
redis.set(`user:${msg.userId}:welcomemessagetext`, "1"),
]);
},
});