mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-18 21:11:39 +01:00
@@ -37,7 +37,7 @@ A full list of Commands can be found [here](#commands-1)
|
||||
|
||||
### Timeouts and whispering messages
|
||||
|
||||
If you've been timed out, you can whisper a message to the chatterbot and it will relay your message to the chat.
|
||||
If you've been timed out, you can ghost whisper a message to the chatterbot and it will relay your message to the chat.
|
||||
You can only send one message every 10 minutes.
|
||||
Try to bargain for your release with the chatter that shot you, or just call them names.
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ chatterEventSub.onUserWhisperMessage(chatterId, async msg => {
|
||||
if (cooldown < 0) {
|
||||
await redis.set(`user:${msg.senderUserId}:whispercooldown`, '1');
|
||||
await redis.expire(`user:${msg.senderUserId}:whispercooldown`, WHISPERCOOLDOWN);
|
||||
await sendMessage(`${msg.senderUserDisplayName} whispered: ${msg.messageText}`);
|
||||
await chatterApi.whispers.sendWhisper(chatterId, msg.senderUserId, "Message sent. Please wait 10 minutes until you can send another message.");
|
||||
await sendMessage(`The ghost of ${msg.senderUserDisplayName} whispered: ${msg.messageText}`);
|
||||
await chatterApi.whispers.sendWhisper(chatterId, msg.senderUserId, "Message sent. You can send another ghost whisper in 10 minutes.");
|
||||
} else {
|
||||
await chatterApi.whispers.sendWhisper(chatterId, msg.senderUserId, `Wait another ${buildTimeString(cooldown * 1000, Date.now())} before sending another message.`);
|
||||
await chatterApi.whispers.sendWhisper(chatterId, msg.senderUserId, `Wait another ${buildTimeString(cooldown * 1000, Date.now())} before sending another ghost whisper.`);
|
||||
};
|
||||
});
|
||||
|
||||
@@ -111,8 +111,8 @@ export function parseMessage(data: createMessageEvent): HTMLDivElement {
|
||||
break;
|
||||
case 'mention':
|
||||
messageElement = document.createElement('span');
|
||||
messageElement.innerText = `Replying to ${messagePart.text}`;
|
||||
messageElement.className = "replyMessage";
|
||||
messageElement.innerText = `${messagePart.text}`;
|
||||
messageElement.className = "mentionMessage";
|
||||
break;
|
||||
};
|
||||
textElement.appendChild(messageElement);
|
||||
|
||||
@@ -24,6 +24,10 @@ body {
|
||||
max-width: 1280px;
|
||||
}
|
||||
|
||||
.badgeContainer {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.message {
|
||||
display: flex;
|
||||
|
||||
@@ -31,8 +35,8 @@ body {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.replyMessage {
|
||||
display: none;
|
||||
.mentionMessage {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
padding: 2px;
|
||||
|
||||
Reference in New Issue
Block a user