Fenix uses websockets, and the current endpoint is wss://bloblet.com:3300
.
All methods will accept an id
parameter, which will be returned without changes. This is optional, but it's nicely useful to make sure you are handling the same request you made.
{
'id': optional,
'type': str,
...
}
{
'type': 'sendMessage',
'channelID': int,
'contents': str
}
- If you dont have access to
channelID
, then aPermissionsError
is raised. - If contents is over 1000 characters, then a
ContentTooLong
error is raised.
{
'type': 'editMessage',
'messageID': int,
'contents': str
}
- If you aren't the owner of
messageID
, then aPermissionsError
is raised. - If contents is over 1000 characters, then a
ContentTooLong
error is raised.
{
'type': 'deleteMessage',
'messageID': int
}
- If you don't have the DeleteMessages permission, or if you didn't send the message, then a
PermissionsError
is raised.
{
'type': 'addReaction',
'messageID': int,
'reaction': str
}
- If you don't have the AddReaction permission, a
PermissionsError
is raised. - If
reaction
is not in the list of supported emojis, aEmojiError
is raised.
{
'type': 'removeReaction',
'messageID': int,
'reaction': int
}
reaction
is the position of the emoji in the array of emojis- If you don't have the DeleteMessages permission, and you didn't send the message, a
PermissionsError
is raised.
{
'type': 'channelHistory',
'channelID': int,
'lastMessage': int
}
lastMessage
is the last message you recieved inchannelID
- You will recive the most recent 50 (or less) new messages in
channelID
in array format. - If you can't read
channelID
or can't read its history, aPermissionsError
is raised.