Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Jalter

Hierarchy

  • Jalter

Index

Constructors

  • new Jalter(token: string): Jalter

Properties

auth: object
base: string
default: typeof Jalter

Methods

  • banUser(guildId: string, userId: string, reason?: string): Promise<object>
  • Ban a member from a guild

    example
    jalter.banUser("974918359500075041", "974918359500075041", "I don't like you").then((res) => { console.log("banUser", res); });
    

    https://discord.com/developers/docs/resources/guild#remove-guild-member

    Parameters

    • guildId: string

      the guild id

    • userId: string

      the user id

    • reason: string = ""

      the reason for banning

    Returns Promise<object>

    204 empty response on success

  • createChannel(guildId: string, name: string, type: number): Promise<object>
  • deleteMessage(channelId: string, messageId: string): Promise<object>
  • getAuditLogs(guildId: string): Promise<object>
  • getChannels(guildId: string): Promise<object>
  • getMe(): Promise<object>
  • getMessage(channelId: string, limit: number): Promise<object>
  • getRoles(guildId: string): Promise<object>
  • getUser(userId: string): Promise<object>
  • joinGuild(inviteUrl: string): Promise<object>
  • kickUser(guildId: string, userId: string): Promise<object>
  • leaveGuild(guildId: string): Promise<object>
  • replyMessage(channelId: string, messageId: string, text: string): Promise<object>
  • Reply to a message

    example
    jalter.replyMessage("974918359500075041", "974963134144069662", "uh?").then((res) => { console.log("replyMessage", res); });
    

    https://discord.com/developers/docs/resources/channel#create-message

    Parameters

    • channelId: string

      the channel id

    • messageId: string

      the message id

    • text: string

      the desired reply text

    Returns Promise<object>

    the message object that was replied

  • sendCount(channelId: string, interval: number, text: string, count: number): Promise<void>
  • Send a message on the channel and will stop once the count is reached

    example

    send a message with a delay of 2 seconds and will stop after reaching 5 messages

    jalter.sendCount("974918359500075041", 2000, "hey", 5).then((res) => { console.log("sendCount", res); });
    

    Non standard stuff, there is no external links except channel#create-message

    Parameters

    • channelId: string

      the channel id

    • interval: number

      the interval delay time

    • text: string

      the message text

    • count: number

      the number of messages to send

    Returns Promise<void>

    the message object send

  • sendInterval(channelId: string, interval: number, textList?: string[]): Promise<number>
  • For farming stuff, fill the array with your custom message, just dont greedy

    example

    send random hey, ho, or let's go

    jalter.sendInterval("974918359500075041", 2000, ["hey", "ho", "let's go"]).then((res) => { console.log("sendInterval", res); });
    
    example

    will send a random hello world in different 72 languages if array is not specified

    jalter.sendInterval("974918359500075041", 2000).then((res) => { console.log("sendInterval", res); });
    

    Non standard stuff, there is no external links except channel#create-message

    Parameters

    • channelId: string

      The destination channel ID

    • interval: number

      The interval time per ms

    • textList: string[] = c.endpoint.hello

      The array of messages

    Returns Promise<number>

    the message object send

  • sendMessage(channelId: string, text: string): Promise<object>
  • typingMessage(channelId: string, timeout?: number): Promise<void>
  • unBanUser(guildId: string, userId: string): Promise<void>

Generated using TypeDoc