sinusbot / scripting-docs Goto Github PK
View Code? Open in Web Editor NEW๐ SinusBot Scripting Documentation
Home Page: https://sinusbot.github.io/scripting-docs
๐ SinusBot Scripting Documentation
Home Page: https://sinusbot.github.io/scripting-docs
#108
in internal tracker)https://sinusbot.github.io/scripting-docs/#channelsetchannelgroup
I'm not able to change the channel group of the client, i checked the client permissions, and the code does not return any exception.
It justs do not make any change to the client.
It should be possible to generate the .ts files from the JSDoc file to get intellisense in VS Code for example.
There is a tools called tsd-jsdoc which generates such a .d.ts
file.
But strangely the require('...')
stuff is not working, even though I've added the generated file to the tsconfig.js
with the // @ts-check
at the file header.
See #113
in internal tracker.
Copy from comments:
Discord:
backend.extended().getGuild(guildId) => guild object
backend.extended().modifyGuild(guildId, guildObject) => guildObject
TS3:
backend.extended().getServerInfo() => server object (native) -- .asObject() => server object
backend.extended().requestExtendedServerInfo() => bool
triggers serverinfo_int event with extended server info object
All functions starting with lowercase characters.
ServerInfo:
Name() string
UID() string
WelcomeMessage() string
Platform() string
Version() int64
HostMessage() string
HostBannerURL() string
HostBannerGFXURL() string
HostButtonTooltip() string
HostButtonURL() string
HostButtonGFXURL() string
NamePhonetic() string
ServerID() int64
IconID() int64
ReservedSlots() int64
HostBannerGFXInterval() int64
DefaultServerGorup() int64
DefaultChannelGroup() int64
DefaultChannelAdminGroup() int64
CodecEncryptionMode() int64
Created() int64
AsObject() object
ExtendedServerInfo:
MaxClients() int64
ClientsOnline() int64
ChannelsOnline() int64
Uptime() int64
ComplainAutobanCount() int64
ComplainAutobanTime() int64
ComplainRemoveTime() int64
MinClientsInChannelBeforeForcedSilence() int64
AntifloodPointsTickReduce() int64
AntifloodPointsNeededCommandBlock() int64
AntifloodPointsNeededIPBlock() int64
ClientConnections() int64
QueryClientConnections() int64
QueryClientsOnline() int64
Port() int64
Autostart() int64
MachineID() string
NeededIdentitySecurityLevel() int64
LogClient() int64
LogQuery() int64
LogChannel() int64
LogPermissions() int64
LogServer() int64
LogFiletransfer() int64
MinClientVersion() int64
MaxDownloadTotalBandwidth() int64
MaxUploadTotalBandwidth() int64
DownloadQuota() int64
UploadQuota() int64
MonthBytesDownloaded() int64
MonthBytesUploaded() int64
TotalBytesDownloaded() int64
TotalBytesUploaded() int64
AsObject() object
still incomplete
callback => (err, object)
SetStatus(statusObject object) bool // see https://discordapp.com/developers/docs/topics/gateway#update-status
GetChannel(channelID string, cb callback) bool
ModifyChannel(channelID string, data object, cb callback) bool
DeleteChannel(channelID string, cb callback) bool
GetChannelMessages(channelID string, cb callback) bool
GetChannelMessage(channelID string, messageID string, cb callback) bool
CreateMessage(channelID string, data object, cb callback) bool
GetGuild(guildID string, cb callback) bool
ModifyGuild(guildID string, data object, cb callback) bool
ev.text
parameterhttps://github.com/SinusBot/scripts/blob/master/scripts/01-speech-recognition.js
Docs: https://discordapp.com/developers/docs/topics/gateway#events
Example:
event.on('discord:GUILD_CREATE', function (ev) {
engine.log('GUILD_CREATE' + JSON.stringify(ev));
});
Every event will be emitted in uppercase and the spaces will be replaced by underscores.
connect should be a member of DB and not appear as global.
since [email protected] i have the problem that the require() function is not resolved anymore. Example: const engine = require('engine');
Everything else is properly resolved.
I use:
IDE: Webstorm 2019.1.2
node: 12.2.0
npm: 6.9.0
Document the rest of the callbacks properly (like in af7f6fd).
requestExtendedServerInfo returns a bool and fires an event (see #22 and this forum post for more)
requestExtendedServerInfo
to {bool} success
serverinfo_int
eventHey, I have a simple question.
I wanna to write plugins in typescript instead of javascript and the types here are available for typescript, but how must I complie the source, to work with sinusbot? Currently I complied it into a bundle file.
I hope you can help me.
Kind regards,
XeroxDev
BannerLayer options are currently undocumented.
Add @property
's here: https://github.com/SinusBot/scripting-docs/blob/master/api/graphics.js#L11
Add example here: https://github.com/SinusBot/scripting-docs/blob/master/api/graphics.js#L39
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.