+2
-2
app/dashboard/[guildId]/moderation/page.tsx
+2
-2
app/dashboard/[guildId]/moderation/page.tsx
···
23
23
const url = `/guilds/${params.guildId}/modules/automod` as const;
24
24
const { data, isLoading, error, edit } = useApi<ApiV1GuildsModulesAutomodGetResponse>(url);
25
25
26
-
const enabled = data && !("message" in data) && Object.values(data.status).some(Boolean);
26
+
const enabled = data && !("message" in data) && (Object.values(data.status).some(Boolean) || data.keywordFilter.length);
27
27
28
28
if (isLoading) return <></>;
29
29
···
90
90
defaultState={data.keywordFilter.join(", ")}
91
91
max={Infinity}
92
92
onSave={(value) => {
93
-
edit("keywordFilter", (value as string | null)?.split(",").map((word) => word.trim()) || []);
93
+
edit("keywordFilter", (value as string | null)?.split(/,|\n/).map((word) => word.trim()) || []);
94
94
}}
95
95
/>
96
96
</>);
+1
-1
components/markdown/emoji.tsx
+1
-1
components/markdown/emoji.tsx
+5
components/markdown/index.tsx
+5
components/markdown/index.tsx
···
25
25
getBaseUrl()
26
26
] as const;
27
27
28
+
const EMOJI_REGEX = /([\u{1F600}-\u{1F64F}]|[\u{1F300}-\u{1F5FF}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|[\u{1F900}-\u{1F9FF}]|[\u{1FA70}-\u{1FAFF}]|[\u{200D}]|[\u{23CF}]|[\u{23E9}-\u{23FA}]|[\u{24C2}]|[\u{25AA}-\u{25AB}]|[\u{25FB}-\u{25FE}]|[\u{00A9}]|[\u{00AE}]|[\u{203C}]|[\u{2049}]|[\u{2122}]|[\u{2139}]|[\u{2194}-\u{2199}]|[\u{21A9}-\u{21AA}]|[\u{231A}-\u{231B}]|[\u{2328}]|[\u{2388}]|[\u{23E9}-\u{23EC}]|[\u{23F0}]|[\u{23F3}]|[\u{25FD}-\u{25FE}]|[\u{2614}-\u{2615}]|[\u{2648}-\u{2653}]|[\u{267F}]|[\u{2692}-\u{269C}]|[\u{26F5}]|[\u{26FA}]|[\u{26FD}]|[\u{2705}]|[\u{270A}-\u{270B}]|[\u{2728}]|[\u{274C}]|[\u{274E}]|[\u{2753}-\u{2755}]|[\u{2757}]|[\u{2795}-\u{2797}]|[\u{27B0}]|[\u{27BF}]|[\u{2B1B}-\u{2B1C}]|[\u{2B50}]|[\u{2B55}]|[\u{2934}-\u{2935}]|[\u{3030}]|[\u{303D}]|[\u{3297}]|[\u{3299}])/gu;
29
+
28
30
export default async function BeautifyMarkdown({
29
31
markdown
30
32
}: {
···
75
77
return text
76
78
?.toString()
77
79
.toLowerCase()
80
+
.replace("[object object],[object object],", "")
81
+
.replace(EMOJI_REGEX, "")
82
+
.trim()
78
83
.replace(/ +/g, "-");
79
84
}
80
85
public/docs-assets/tts-volume.webp
public/docs-assets/tts-volume.webp
This is a binary file and will not be displayed.
+40
-25
public/docs/text-to-speech.md
+40
-25
public/docs/text-to-speech.md
···
21
21
22
22
To get a quick **.mp3 file** of your message, use `/tts file` in any text channel.
23
23
24
-
### ๐ Auto Translate
25
-
Automatically translate messages from any language to match your [current voice's language](/docs/text-to-speech#voices) for free.
26
-
27
-
* **For Commands**: Set the `translate` option to `yes` (i.e.: `/tts voice text:Hello World translate:yes`)
28
-
* **For Chat to Speech**: Append `-tr` to the end of your message (i.e.: `Hello World -tr`)
29
-
30
24
### ๐ Usage logs
31
25
Pick a channel where any Text to Speech events from your server should be logged, mainly for moderation purposes.
32
26
<br />
···
56
50
<br />
57
51
<br />
58
52
59
-
While this feature is free, we would be grateful if you could consider [shooting us a donation](https://ko-fi.com/mwlica) or [voting on top.gg](/vote). Please note that messages longer than 300 characters are vote locked. Unfortunately, money and growth (sadly) don't grow on trees (money isn't exactly normal paper).
53
+
While this feature is free, we would be grateful if you could consider [shooting us a donation](/premium) or [voting on top.gg](/vote). Please note that messages longer than 300 characters are vote locked. Unfortunately, money and growth (sadly) don't grow on trees (money isn't exactly normal paper).
60
54
61
55
### ๐ค Blacklist users & roles
62
56
If you want to prevent certain users from using text or chat to speech, you can either use Discord's channel or integration permission system. ([watch a tutorial](/disable-commands))
63
57
64
-
## Server nodes & regions
65
-
For optimal latency and performance when using Text to Speech in voice channels, Wamellow has multiple server nodes in different regions.
66
-
A list of available nodes and regions can be found [on the status page](/status).
58
+
## Moderation
59
+
You can use Wamellow's native **<:badge_automod:1307719909618225263> AutoMod** to block certain words or phrases for Text-to-Speech by [setting up rules on your server's Moderation tab](/profile?to=moderation).
60
+
Separate words or phrases with a comma (e.g., `dog, cat, tiger`) or a new line. For each word, use an asterisk (`*`) at the beginning, end, or both for partial matching.
61
+
<br />
62
+
<br />
63
+
64
+
Members with `Manage Server` or `Administrator` permissions will bypass AutoMod. Separate whitelisted roles and channels can also be added to bypass AutoMod in the moderation settings.
67
65
<br />
68
66
<br />
69
67
70
-
If the voice channel's *Region Override* is set to `Automatic`, it will default to Frankfurt, Germany.
71
-
If an override is set, it will use the selected region, if available.
68
+
**Note:** For `/tts` commands, only Wamellow's native AutoMod can block messages. Chat-to-Speech messages can also be blocked by Discord's native AutoMod โ and all other bots that rely on it โ in addition to Wamellow's own. If you're using a third-party moderation system, such as other bots, that only delete messages after they were sent, rather than blocking them directly, will not be able to block messages for Text-to-Speech.
72
69
73
70
## Avoiding Chat-to-Speech
74
71
To prevent Wamellow from speaking your messages inside of Chat to Speech channels, simply take the following actions:
···
79
76
<br />
80
77
81
78
**Note:** Any of those methods only apply to you and your own messages, and not to anyone else using chat to speech.
82
-
If you want to disable it for everyone, read the [setup section of these docs](#setup).
79
+
If you want to disable it for everyone, [read the setup section of these docs](#setup).
83
80
84
81
## Voice filters
85
82
Filters are a way to tamper with the voices when using Wamellow in VCs, they can be toggled using `/tts set filter` by VC moderators.
···
99
96
<br />
100
97
101
98
To change the volume of the TTS or mute it entirely for yourself,
102
-
- (desktop) Right-click Wamellow, and set the "User Volume" slider.
103
-
- (mobile) Open Wamellows' profile, and set the "Volume" slider.
99
+
- **(desktop)** Right-click Wamellow, and set the "User Volume" slider.
100
+
- **(mobile)** Open Wamellows' profile, and set the "Volume" slider.
104
101
105
102

106
103
107
-
## Troubleshooting
108
-
If Wamellow joins the voice channel but doesn't speak, check that it has the `Connect` and `Speak` permissions in the channel settings. If it does, [please report the issue to us](/support).
104
+
## Voices
105
+
You can change your default language and voice either by running `/tts set speaker` or by [setting it on the dashboard](/profile/text-to-speech).
109
106
<br />
110
107
<br />
111
108
112
-
If Wamellow says that someone else's message is still being spoken, but it's not talking, use `/tts voice-stop`.
113
-
You can also use this to stop any message that is currently being spoken (i.e.: because of spam).
109
+
You can also change the voice on a per-message basis by setting the `voice` option when using `/tts file` or `/tts voice`, i.e.: `/tts voice text:Hello World voice:en_female_samc`. This can also be combined with the auto translate flag.
110
+
111
+
### ๐ Auto Translate
112
+
Automatically translate messages from any language to match your current voice's language for free.
113
+
114
+
* **For Commands**: Set the `translate` option to `yes` (i.e.: `/tts voice text:Hallo Welt translate:yes`)
115
+
* **For Chat to Speech**: Append `-tr` to the end of your message (i.e.: `Hallo Welt -tr`)
114
116
115
-
## Voices
116
-
You can change your default language and voice either by running `/tts set speaker` or by [setting it on the dashboard](/profile/text-to-speech).
117
-
<br />
118
-
<br />
119
-
You can also change the voice on a per-message basis by setting the `voice` option when using `/tts file` or `/tts voice`, i.e.: `/tts voice text:Hello World voice:en_female_samc`. This can also be combined with the [auto translate](/docs/text-to-speech) flag.
117
+
### <:YA_PepeStare:832631300132438046> List of Available Voices
120
118
121
119
<table>
122
120
<thead>
···
225
223
<tr><td>๐บ๐ธ English (singing)</td><td>Thanksgiving (Male)</td><td><audio controls src="https://r2.wamellow.com/tts-preview/en_male_sing_funny_thanksgiving.mp3" /></td></tr>
226
224
<tr><td>๐บ๐ธ English (singing)</td><td>Pop Lullaby (Female)</td><td><audio controls src="https://r2.wamellow.com/tts-preview/en_female_f08_twinkle.mp3" /></td></tr>
227
225
</tbody>
228
-
</table>
226
+
</table>
227
+
228
+
## Server nodes & regions
229
+
For optimal latency and performance when using Text to Speech in voice channels, Wamellow has multiple server nodes in different regions.
230
+
A list of available nodes and regions can be found [on the status page](/status).
231
+
<br />
232
+
<br />
233
+
234
+
If the voice channel's *Region Override* is set to `Automatic`, it will default to Frankfurt, Germany.
235
+
If an override is set, it will use the selected region, if available.
236
+
237
+
## Troubleshooting
238
+
If Wamellow joins the voice channel but doesn't speak, check that it has the `Connect` and `Speak` permissions in the channel settings. If it does, [please report the issue to us](/support).
239
+
<br />
240
+
<br />
241
+
242
+
If Wamellow says that someone else's message is still being spoken, but it's not talking, use `/tts voice-stop`.
243
+
You can also use this to stop any message that is currently being spoken (i.e.: because of spam).