arabs
TypeScript icon, indicating that this package has built-in type declarations

0.0.11-dev • Public • Published

Samsung GitHub

Example

const { Client } = require('arabs');
const bot = new Client({
    port: '{ExpressPort ?? 8000}',
    token: '{ClientToken}',
    clientPublicKey: '{ClientPublicKey | ClientVerifyKey}',
    endpointURL: '{EndpointURL ?? '/api/interactions'}'
})

bot.on('ready', async(client) => {
    console.log(`${client.username}'s Online!`);
})

bot.on('interactionCreate', async Interaction => {
    if(Interaction.type === InteractionType.INTERACTION_COMMAND) {
        if(Interaction.data.name === 'test') {
            bot.createInteractionResponse(Interaction, {
                type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
                data: {
                    content: 'Pong!'
                }
            })
        }
    }
})

bot.commands.put([
    { type: 1, name: 'test', description: 'Discord Interactions HTTP' }
])

bot.connect()

Ngrok

http://localhost:8000https://0600-197-36-31-32.ngrok.io

The Website

Developers

TOBZi (Mohammed) - محمد


Boda (Abdalaziz) - عبدالعزيز

Package Sidebar

Install

npm i arabs

Weekly Downloads

3

Version

0.0.11-dev

License

MIT

Unpacked Size

19.5 kB

Total Files

15

Last publish

Collaborators

  • arabs-team