This commit is contained in:
KTrain 2025-06-29 01:11:04 +00:00 committed by GitHub
commit 97142f5482
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 40 additions and 0 deletions

View 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
View 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.