Skip to content

Commit 7dd9f0d

Browse files
committed
Added filter to mentions
1 parent e482ed5 commit 7dd9f0d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Package.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# contributors
66
author = "SyedMuhammad"
77
# version
8-
version = "0.0.1"
8+
version = "0.0.4"
99
# image URL
1010
image = ""
1111
# package type: 'script' (normal package), 'game-mode' (unique package - can only load one at a time) or 'loading-screen' (special package loaded in loading screen)

Server/Index.lua

+7
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ if (not DISCORD_WEBOOK_ID or not DISCORD_WEBOOK_TOKEN or DISCORD_WEBOOK_ID == ""
1010
return
1111
end
1212

13+
function FilterMessage(message)
14+
message = message:gsub("@", "")
15+
end
16+
1317
-- Send Message method
1418
function SendDiscordMessage(message)
19+
-- Filter bad words
20+
message = FilterMessage(message)
21+
1522
HTTP.Request(
1623
"https://discord.com",
1724
"/api/webhooks/" .. DISCORD_WEBOOK_ID .. "/" .. DISCORD_WEBOOK_TOKEN,

0 commit comments

Comments
 (0)