Call mod chat webhook

I was looking to make a call mod chat webhook, where someone would say “?callmod” or something of the like, and it would send their profile URL to a certain channel in a Discord server so a mod can join their server. I’m just trying to look for the Roblox equivalent of Discord.py’s message.content. I figured it has something to do with ContextActinService but I’m not sure.

I’ve tried the Dev Hub already but I can’t find what I’m looking for.

Any help will be grateful.

Hello i don’t think this will work I tried it before and I immediately stopped the service just for the fact that if you have more than 1 server running and the person reporting you doesn’t allow join requests it can cause all sorts of problems I would recommend that the script gives you the game and for the server code or something you can join the player without going to profile.

I’m not sure on how it will violate Roblox TOs but I’ll keep it in mind thanks.

You need to utilize the HttpService PostAsync method to the webhook link.

WARNING: DO NOT USE DISCORD AS A SORT OF LOGGING. You may hit the limit and thus moderation action will take place to your Discord account.

Another reason you shouldn’t use this because exploiters can just spam it.

I’ve seen it used before so I’m sure it is possible now.

Make sure to add rate limiting.

I’d recommend using plr.Chatted() event that’ll fire once a player has stated a message, then check if that message is !modcall by using string.lower(msg) and an if statement, which will lower each character from the message - so if they type in !mODcall, it’ll be valid. If the message is valid, you’d use HttpService to post a message to the webhook by using PostAsync. I’d recommend seeing tutorials on how to create an embed, as this will assist you whilst creating a webhook. If you want to see what you can use for webhooks, see Discord’s API. I’d recommend adding a cooldown so the player won’t spam the function, and be sure to not use Discord for logging, especially for a common event for high-traffic games.

[ wrong reply, meant @gxenious ]

I’ll add a sort of debounce or rate limiter.

Isn’t the chatted event “player.Chatted”

Depends on what you named the player as in the brackets of game.Players.PlayerAdded:Connect(function(the_players_name)).

Of course. I am just pointing out that it’s .Chatted not :Chatted()

Using “()” at the end of a statement indicates that it’s a method in common documentation. Just because in real use the syntax would be incorrect doesn’t mean it’s wrong in documentation.

For example, one method of a player class is CharacterAdded(), where we use the parenthesis to indicate that it’s a method and not an attribute such as Character.

Hope this helps,
-Tom :slight_smile:

1 Like

Any idea how I can actually get this 'server code"?

Errr… What? Mind explaining more?

Sadly i don’t know how :confused: i wish i could help with that.

Well where did you find out about it?

Got the script to work, thanks for all the suggestions!