Skip to content

Latest commit

 

History

History
169 lines (115 loc) · 3.5 KB

API.md

File metadata and controls

169 lines (115 loc) · 3.5 KB

Copyright (c) 2022, dorpier

Event ? Enable DiscordBotClient first

The event name is lowercase with the form snake_case. All events here

client.connect()

client.on("message_create", async function({ message }) {
    if (message.content == "!ping" && message.author.id === client.user.id) {
        await sendMessage('pong');
    }
});

Disconnect (Other functions can still be used, except for receiving events)

client.disconnect()

Class from Discord.js:

MessageActionRow

MessageButton

MessageSelectMenu

MessageEmbed

BitField

Permissions

Functions

getCurrentChannel

let channel = getCurrentChannel()
console.log(channel)

getCurrentGuild

let guild = getCurrentGuild()
console.log(guild)
sendMessage('Hello World')

getModule

const module = getModule('loginToken')
module.loginToken('BotToken')

findModule

const module = findModule('loginToken')
console.log(module)

switchToken

switchToken('BotToken')

getStatus

getStatus('userId')

Global Variables

client

DiscordBotClient

localStorage_

window.localStorage

loadFullGuild, allGuild, intentBot

number

lasestGuildIdVoiceConnect

Snowflake (string)

DiscordBotClient

export class Client {
    constructor() {
        this.events: Object;
        this._connected: Boolean;
    }

    get connected(): Boolean

    connect(): void

    disconnect(): void

    on(event, callback, raw = false): void

    async emit(event, data): void

    get sessionID(): String

    get fingerprint(): String

    get requiredAction(): unknown

    get user(): User

    get guilds(): Array<Guild>

    get guildFolders(): Array<GuildFolder>

    get privateChannels(): Array<DMChannel>

    getGuild(id): Guild

    getGuildChannels(guildID): Array<GuildChannel>

    getChannel(id): GuildChannel | DMChannel

    getChannelThreads(channelID): Array<ThreadChannel>

    createDM(...id): DMChannel

    getUser(id): User

    getGuildMember(guildID, id): GuildMember

    getGuildMembers(guildID): Array<GuildMember>

    requestGuildMembers(
        ids,
        { query = "", limit = 10, presences = true, userIDs = [] },
    ) {
    }: Array<GuildMember>

    startTyping(channelID): void

    stopTyping(channelID): void

    getChannelMessages(channelID): Array<Message>

    sendMessage(
        channel,
        content = "",
        {
            tts = false,
            messageReference = null,
            allowedMentions = null,
            stickerIDs = null,
        },
    ) {
    }: unknown

    sendClydeMessage(channel, content, embeds): unknown

    sendClydeError(channel): unknown
}