Added documentation

This commit is contained in:
Violet Millie 2020-11-02 13:41:50 +00:00
parent b77e4377ab
commit 9c740d20c3
3 changed files with 38 additions and 0 deletions

View File

@ -1,3 +1,11 @@
-- Norbunny
-- November 1, 2020
--[[
Message.new(content: string) - Creates a new message
Message.addEmbed(embed: RichEmbed) - Attaches a RichEmbed to the message
]]
local Message = {} local Message = {}
Message.ClassName = "Message" Message.ClassName = "Message"
Message.__index = Message Message.__index = Message

View File

@ -1,3 +1,21 @@
--[[
RichEmbed.new(title: string, description: string) - Creates a new RichEmbed
RichEmbed:setTimestamp() - Sets the RichEmbed's timestamp
RichEmbed:setColor(color: RGB) - Sets the RichEmbed's color
RichEmbed:setFooter(text: string, iconUrl: string) - Sets the RichEmbed footer's text & icon
RichEmbed:setImage(url: string, height: int, width: int) - Sets the RichEmbed's image & its resolution
RichEmbed:setThumbnail(url: string, height: int, width: int) - Sets the RichEmbed's thumbnail & its resolution
RichEmbed:setAuthor(name: string, url: string, iconUrl: string) - Sets the RichEmbed's author name, url & icon
RichEmbed:addField(name: string, value: string, inline: boolean) - Adds a field to the RichEmbed with the arguments passed
]]
local RichEmbed = {} local RichEmbed = {}
RichEmbed.ClassName = "RichEmbed" RichEmbed.ClassName = "RichEmbed"
RichEmbed.__index = RichEmbed RichEmbed.__index = RichEmbed

View File

@ -1,6 +1,18 @@
-- Norbunny -- Norbunny
-- November 1, 2020 -- November 1, 2020
--[[
RoHook.new(url: string, username: string, avatar: string) - Creates a new RoHook instance
RoHook:setUsername(username: string) - Sets the webhook's username
RoHook:setAvatar(url: string) - Sets the webhook's avatar
RoHook:send(data: RichEmbed) - Sends a RichEmbed
RoHook:send(data: Message) - Sends a Message
]]
local httpService = game:GetService("HttpService") local httpService = game:GetService("HttpService")
local RoHook = {} local RoHook = {}