GENERATE YOUR KEY HERE https://EMS.usernamewitheld.repl.co
VIEW UPTIME HERE EMS if all 5 monitors say offline, only then should you contact me.
GET THE MODULE HERE EMS - Roblox
VIEW EXAMPLE CODE HERE https://gist.github.com/Embedded77/9ef68aa8712f5ecf88a24da6aec1ee2a
What is EMS?
EMS is a variation of MessagingService created by me. It features a multitude of incredibly useful methods which I found people needed.
What purpose does this serve?
EMS was created to allow for cross-game messaging. It features connecting webhooks to channels as well as all of the standard messaging service functions. You can also recall old messages, which are saved to a unique id.
Will this greatly impact performance?
Not noticeably. I actually created a whole roblox discord client using it, game ran buttery smooth.
How do I use it?
How to use specific methods is documented below.
You must first visit my website to generate your unique token. This token should not be shared with anyone except for the developers of your game. This token can be reset at any time.
You may get the module here
Is it secure?
Your security is a major priority in this project and I strive to improve it any way I can. All of the fields passed to us are encrypted, excluding the timestamp and channel name.
You may erase any of your messages at any time from our records by simply deactivating your token, or erasing single messages.
What if your web server is down?
I’m almost done implementing a retrial system in the rare event my web server is offline for a few seconds or more.
Please feel free to ask any more questions by replying to this topic.
Documentation
EMS.new(apiToken)
This function creates a new EMS instance.
Parameters:
apiToken: string
– the api token you received when registering on our site.
Returns:
EMS: object
– the EMS object you can now use with the other methods.
Example:
EMService=require(game.ServerStorage.EMS)
local ems=EMService.new("myveryveryrealandnotfaketoken")
EMS:Subscribe(channelID,onMessage)
This function subscribes this server to the specified channel.
Parameters:
channelID: string
– the id of the channel you want to handle the messages on
onMessage: function
--the function you want to be called when there’s a new message
Returns:
nil
Example:
ems:Subscribe("Notifications",function(message)
print(message)--{author="serverid",content="messagecontent",timestamp="12345678",messageID:1234}
end)
EMS:RemoveSubscription(channelID)
This function removes any subscriptions this server has to the specified channel.
Parameters:
channelID: string
– the id of the channel you want to remove the handler for
Returns:
nil
Example:
ems:RemoveSubscription("Notifications")
EMS:ConnectWebhook(channelID,webhookURL)
This function sends a POST request to the specific webhook url when a message is received
Parameters:
channelID: string
– the id of the channel you want to monitor
webhookURL: string
– the url of the webhook you want it to send a request to.
Returns:
nil
Example:
ems:ConnectWebhook("Notifications","CoolWebhook1234")
EMS:RemoveWebhookConnection(channelID)
This function removes any webhook connections this server has to the specified channel.
Parameters:
channelID: string
– the id of the channel you want to remove the connection for
Returns:
nil
Example:
ems:RemoveWebhookConnection("Notifications")
EMS:ValidateToken()
This function validates the token of the current EMS object.
Parameters:
none
Returns:
result: boolean
– whether the token is valid or not.
Example:
ems:ValidateToken()
EMS:Post(channelID,content)
This function validates the token of the current EMS object.
Parameters:
channelID: string
– the channel you want to send the message to
content: string
– the content of the message you want to send
discordData: object
– the discord webhook data.
Returns:
result: object
– whether the message was sent or not
Example:
ems:Post("Notifications","Hi",{
content = content;
username = "EMS";
avatar_url = "https://catfriendly.com/wp-content/uploads/2019/06/AdobeStock_53119595.jpeg"
})
EMS:FetchContent(messageID)
This function fetches the content of the message with the specified id.
Parameters:
messageID: integer
– the id of the message you want to fetch
Returns:
result: table
– This function will return nil if the messageID is invalid or your token is not authorized to view it.
Example:
ems:FetchContent(1234) -- {author="serverid",content="messagecontent",timestamp="12345678",messageID=1234}
EMS:Delete(messageID)
This function deleted the message with the specified id.
Parameters:
messageID: integer
– the id of the message you want to delete.
Returns:
result: boolean
– whether it was deleted
Example:
ems:Delete(1234) -- true
EMS:Begin(messageID)
Begin the EMS Handler
Parameters:
interval: integer
– the intervals which it should scan for new messages
Returns:
function
– the coroutine which you may run in order to start up ems
Example:
ems:Begin(1)()
Web Docs
GET
fetch_message_packet
Query:
timestamp
– The timestamp you want messages from
key
– the key you generated
POST
new_message
Headers:
token
timestamp
author
channel
content
GET
fetch_archived_message
Query:
key
messageid
POST
erase_message
Query:
key
Headers
messageid
Contact
Questions? Concerns?You can contact me here: