0.0.4-beta • Published 11 months ago

@arabie/discord v0.0.4-beta

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

Activities

const { Activities } = require('@arabie/client')
const { Client } = require('discord.js')
const client = new Client({ intents: [...intents] })
const activities = new Activities(client)

client.on('messageCreate', async Message => {
    if(Message.content === '!youtube') {
        if(!Message.member.voice.channel) return Message.reply({
            content: `${Message.author}, Please join to voice channel`,
            allowedMentions: { repliedUser: false }
        })
        const Invite = await activites.create(Message.member.voice.channelId, {
            targetApplicationID: '880218394199220334',
            maxAge: 60000,
            maxUses: 0,
            temporary: true
        })

        Message.channel.send({ content: Invite });
    }
})

ButtonPagination

const { ButtonPaginationInteraction } = require('@arabie/discord')

client.on('interactionCreate', async Interaction => {
    if(!Interaction.isChatInputCommand() && Interaction.commandName === 'button-pagination') {
        const EmbedOne   = new EmbedBuilder() .setDescription('Embed #1')
        const EmbedTwo   = new EmbedBuilder() .setDescription('Embed #2')
        const EmbedThree = new EmbedBuilder() .setDescription('Embed #3')
        const EmbedFour  = new EmbedBuilder() .setDescription('Embed #4')
        const EmbedFive  = new EmbedBuilder() .setDescription('Embed #5')
        ButtonPaginationInteraction(Interaction, [EmbedOne, EmbedTwo, EmbedThree, EmbedFour, EmbedFive], {
            components: {
                emojis: {
                    firstPage: '⏮',
                    previousPage: '⏪',
                    delete: '🗑',
                    nextPage: '⏩',
                    lastPage: '⏭'
                },
                styles: {
                    firstPage: ButtonStyle.Primary,
                    previousPage: ButtonStyle.Primary,
                    delete: ButtonStyle.Danger,
                    nextPage: ButtonStyle.Primary,
                    lastPage: ButtonStyle.Primary
                }
            },
            embedFooter: '@arabie/discord', // the Default Footer `Page {page}/{pages}`
            collectorTimeout: 60000
        })
    }
})
0.0.4-beta

11 months ago

0.0.3-beta

11 months ago

0.0.2-beta

11 months ago

0.0.1-beta

11 months ago

0.0.0-beta

11 months ago