
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
scalecord.ts
Advanced tools
Powerful Discord API library based on Discordeno components, allowing vertical and horizontal scaling.
Powerful Discord API library based on Discordeno components, allowing vertical and horizontal scaling.
If you need help, feel free to join our Discord server. ☺
The seperate gateway/rest setup requires you to have two processes. One, which will have the standalone gateway/rest and the other your bot, where the Discord Payloads will be transmitted to.
It is also possible creating two seperate processes for the standalone gateway & rest for the sake of simplicity the example below will show both together.
File: Server.js
import { GatewayServerProvider, RestServerProvider , Server} from 'scalecord.ts'; // change to lib import
import { GatewayIntents } from 'discordeno/types';
import config from './config.json'
const server = new Server({
token: config.token,
providers: {
rest: new RestServerProvider({
secretKey: '111',
customUrl: 'http://localhost:3000'
}),
gateway: new GatewayServerProvider({
secretKey: '111',
customUrl: 'http://localhost:3001',
intents: GatewayIntents.GuildMessages | GatewayIntents.MessageContent,
// tcpOptions: Opt-into tls & certificate mode, when you want to use it on a public machine
// -> https://github.com/meister03/discord-cross-hosting#42-certificate-mode
totalMachines: 1,
})
}
})
server.gateway?.start()
File: Bot.js
import { RestClientProvider, createBot, GatewayClientProvider } from 'scalecord.ts';
import config from './config.json'
const bot = createBot({
token: config.token,
events: {
messageCreate: (bot, message)=>{
if(message.isFromBot) return;
// do your stuff
}
}
},
{
rest: new RestClientProvider({
secretKey: '111',
customUrl: 'http://localhost:3000',
}),
gateway: new GatewayClientProvider({
secretKey: '111',
customUrl: 'http://localhost:3001',
// tcpOptions: Opt-into tls & certificate mode, when you want to use it on a public machine
// -> https://github.com/meister03/discord-cross-hosting#42-certificate-mode
})
}
)
bot.gateway?.start()
If you encounter any problems feel free to open an issue in our GitHub repository or join the Discord server.
FAQs
Powerful Discord API library based on Discordeno components, allowing vertical and horizontal scaling.
We found that scalecord.ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.