I was coding the plugin some more and I used some code from the talk command. My code is below.
API = nil;
local ChatHaxChat = game.ReplicatedStorage.ChatHaxChat
return function()
ChatHaxChat.OnServerEvent:Connect(function(Speaker, Message, Object)
local arguments = {Speaker,Message,"all",Object,"default"};
local success,result = API.chatSystem:createMessageObject(unpack(arguments));
if(success) then
result.message = result.unfilteredMessage;
result.unfilteredMessage = nil;
result.filter = nil;
result.isFiltered = true;
API.network:fireClients("onMessageFiltered",API.channel:getChannel("all"):getSpeakers(),result);
else
warn("[BETTER CHAT ERROR]:",result);
end
end)
end
I keep getting the error ServerScriptService.Server.modules.chatSystem:193: Failed to pass "string" for "speakerName" - Server - chatSystem:193. What am I doing wrong?
Does anybody else have a problem with mentions tagging for some users then not actually working due to it? If so and you found a solution, what did you do?
I’ve regained some slight motivation, hoping to do a few smallish updates soon. I really want to do a ground-up rewrite but it’d be a lot of work to function the same + not be noticeably different. I’m patching some bugs and adding new functions, please suggest some for me to do!
Fixed registerMessageProcessFunction in the server API.
Introduced a return system for plugins ex:
-- This is now valid syntax instead of requiring a variable = nil annoying thing
return function(API)
print(API)
end
Added a new quickMessage function for both the server and client API. (Server replicates to all clients, and the client will not)
Example:
-- Arguments: NAME/MESSAGE/NAME COLOR/TEXT COLOR (colors will swap to default if not added)
API:quickMessage("username","their message",Color3.fromRGB(255,0,0),Color3.fromRGB(255,255,0));
-- This creates a message from "username" with a red name color that says "their message" in gold
NOTICE:
I want to make more updates, so please leave the suggestions here! I sometime plan to do a rewrite when I have motivation and a lot of free time to develop the system. Also, please leave bugs here and not the discord since I currently do not have access to my discord account.
You were doing nothing wrong, it’s my fault with messing up a basic line of code. I’ve fixed it, and this function will work now. Sorry for your inconveniences!
I would say have the ability to customize the Server: TextColor. I was able to do it in the code myself but it’s janky and errors if I don’t pass a table. (if it already exists oops)
It is used for fighting games, be it FPS, PVP, PvE,Etc.
It has some flaws, like when saying trash it automatly assume its a toxic message.
Another flaw is that it will add extra delay when sending a message, and when the first message is send in the server it will take like 10 seconds to send
API = nil; --> When the plugins are loaded, this variable will be defined.
return function()
game:GetService("ReplicatedStorage").MakeChatClientMessage.OnClientEvent:Connect(function(Msg)
API.systemMessage(
Msg,
"all"
)
end)
end
Server:
API = nil; --> When the plugins are loaded, this variable will be defined.
local AntiToxicity = require(6904706913)
return function()
API:registerMessageProcessFunction(function(messageObject)
local analized = AntiToxicity.fullanalyze(messageObject.unfilteredMessage)
if analized.insult > 80 or analized.toxic > 85 or analized.spam > 65 then
game:GetService("ReplicatedStorage").MakeChatClientMessage:FireClient(messageObject.player,"Your message's insult/toxic/spam rate is too big. Rate: {Insult: "..analized.insult.." ; Toxic: "..analized.toxic.." ; Spam: "..analized.spam.."}")
return true,"This message will be hidden due to being an insult/toxic/spam message."
end
return false
end)
end
Also, remember to create a remote event called MakeChatClientMessage in ReplicatedStorage!
Good Api, I tested it.
I got the text message to delete it for spam so this can help reduce Roblox Bots that say “Wow I got free r**** at r****.g**” – There are no Websites in this text if they are then they weren’t intended. Some words are blanked out so I don’t get banned
for spam I think you could lower it to like 40 maybe 50 since those spam rates are also high.
and also You could contact the creator of the module or make it a model so other people can just grab it from the toolbox making it easier
Damn I literally just posted a guide fixing registerMessageProcessFunction on discord.
Add clear history option to channels so that my plugin doesn’t require forking the source code.
My plugin currently uses a custom function within channels module that sets history to a blank table.
I’ll attach some screenshots of stuff I’ve suggested/bug reported.
Aw, I’m sorry! I don’t have access to my discord currently. The missing emojis were created when I ran all the emojis through the roblox chat filter and the ones that were filtered were removed. And I’ll work on the clear history option!.