mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 05:51:37 +01:00
@@ -37,7 +37,7 @@ A full list of Commands can be found [here](#commands-1)
|
|||||||
|
|
||||||
### Timeouts and whispering messages
|
### 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.
|
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.
|
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) {
|
if (cooldown < 0) {
|
||||||
await redis.set(`user:${msg.senderUserId}:whispercooldown`, '1');
|
await redis.set(`user:${msg.senderUserId}:whispercooldown`, '1');
|
||||||
await redis.expire(`user:${msg.senderUserId}:whispercooldown`, WHISPERCOOLDOWN);
|
await redis.expire(`user:${msg.senderUserId}:whispercooldown`, WHISPERCOOLDOWN);
|
||||||
await sendMessage(`${msg.senderUserDisplayName} whispered: ${msg.messageText}`);
|
await sendMessage(`The ghost of ${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 chatterApi.whispers.sendWhisper(chatterId, msg.senderUserId, "Message sent. You can send another ghost whisper in 10 minutes.");
|
||||||
} else {
|
} 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;
|
break;
|
||||||
case 'mention':
|
case 'mention':
|
||||||
messageElement = document.createElement('span');
|
messageElement = document.createElement('span');
|
||||||
messageElement.innerText = `Replying to ${messagePart.text}`;
|
messageElement.innerText = `${messagePart.text}`;
|
||||||
messageElement.className = "replyMessage";
|
messageElement.className = "mentionMessage";
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
textElement.appendChild(messageElement);
|
textElement.appendChild(messageElement);
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ body {
|
|||||||
max-width: 1280px;
|
max-width: 1280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badgeContainer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.message {
|
.message {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@@ -31,8 +35,8 @@ body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.replyMessage {
|
.mentionMessage {
|
||||||
display: none;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
|||||||
Reference in New Issue
Block a user