Merge 65873d1fbe
into 6204acfc79
This commit is contained in:
commit
97142f5482
2 changed files with 40 additions and 0 deletions
28
src/handlers/event/dms_vcs.rs
Normal file
28
src/handlers/event/dms_vcs.rs
Normal file
|
@ -0,0 +1,28 @@
|
|||
use std::{sync::OnceLock, time::SystemTime};
|
||||
|
||||
use eyre::Result;
|
||||
use log::trace;
|
||||
use poise::serenity_prelude::{Context, Message};
|
||||
use regex::Regex;
|
||||
|
||||
fn regex() -> &'static Regex {
|
||||
static REGEX: OnceLock<Regex> = OnceLock::new();
|
||||
REGEX.get_or_init(|| Regex::new(r"(?i)\b(?:dms|dm|vc|vcs|voice call|screenshare)\b").unwrap())
|
||||
}
|
||||
|
||||
const MESSAGE: &str = "Please try to keep all support conversations here, run `/tag dm` to learn more.";
|
||||
|
||||
pub async fn handle(ctx: &Context, message: &Message) -> Result<()> {
|
||||
if !regex().is_match(&message.content) {
|
||||
trace!(
|
||||
"The message '{}' (probably) doesn't say DMs, VCs",
|
||||
message.content
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let response = format!(MESSAGE);
|
||||
message.reply(ctx, &response).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
12
tags/dm.md
Normal file
12
tags/dm.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: Do not ask for Prism Launcher support in direct/voice chats!
|
||||
color: red
|
||||
---
|
||||
|
||||
We do not recommend support in DMs or VCs. This is because:
|
||||
|
||||
- You are forcing the person to commit to helping you. Everyone that helps out in support channels is a volunteer and isn't obligated to help you.
|
||||
- The person trying to help you may give a bad answer, whether due to lack of knowledge, language barriers or out of malice, and they cannot be easily corrected by others.
|
||||
- You are slowing down your response time by banking on one person to be available rather than asking in a forum where there will usually be someone with expertise.
|
||||
- Most people who actively help others here will redirect you to the support forum anyways. You might as well save your and their time by asking in the proper space.
|
||||
- VCs require people to reveal their voice. Not everyone is comfortable with this and it's often harder to resolve via VC anyways.
|
Loading…
Add table
Add a link
Reference in a new issue