1.0.1 • Published 3 years ago

gydo-js v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Gydo-JS

The Main branch of Gydo-JS (Stable Branch)

Report bugs in our Discord Server

Dev Branch

Github Repo

Jump to Pages (Table of Contents)

Setup

const gydo = require("gydo-js");
const bot = new gydo.config({
    // change the <token here> to your bots token, same with the prefix (you can only do one prefix yet)
    token: "<token here>",
    prefix: "<your prefix>"
});

You will automatically have this intents: GUILDS GUILD_MESSAGES

Which is enough, and what is required.

See Intents you need: See DJS v13 Intents

Once you've completed the setup, you can run node . (or node <filename>.js) in your terminal to run the bot.

Commands

If you encounter any bugs, please report it to our Discord Server

Before you put any commands put:

bot.MessageDetect()

For the command to actually work (Make sure to put it above the commands)

To create a command do:

bot.cmd({
    name: "<cmd name>", 
    code: "<code>"
});

Every command will start with your prefix like ?ping

Example Command:

bot.cmd({ 
    name: "ping",
    code: "Pong! ({ping}ms)"
});

Functions: {ping} - Sends the Bot's ping

{message-author-tag} - Sends the tag of the user who sent/ran the command

{message-author-id} - Sends the ID of the User who ran the command

{bot-user-tag} - Sends the tag of your Bot

{bot-user-id} - Sends the ID of your Bot

{guildname} - Sends the Guild's name

Since this is the Dev branch, there is unfortunately, no documentation for this, yet.

Slash Commands

Make sure your bot has the permission to create slash commands

Simple Ping Slash Command:

bot.slashCommand({
    name: "ping",
    description: "a simple ping command",
    code: "pong",
    // optional
    guildId: "1234567890"
});

You can also put {ping} inside code: "" to get the bots ping.

If you want your slash command to only be created on a specific server, then you can put the server's guild ID in guildId

To detect the slash command:

bot.slashCommandDetect("ping")

You will have to do bot.slashCommandDetect("<slashCommandName>") to detect the slash commands you've created, otherwise the bot will say "interaction failed"

Status

bot.status("<status>", { type: "PLAYING" });

or a Changing Status Loop

bot.loopStatus(["<status>", "another one"], 1000, { type: "PLAYING" })

It must be on an Array, otherwise it'll send an error.

The Second Argument (or the time) is in Miliseconds (1000 = 1 second), and you can't go below 1000 ms, or it'll send an error.

Status Types are: PLAYING, LISTENING, WATCHING, and STREAMING

Member Leave Event

bot.guildMemberRemove({
    message: "Sad to see you leave {member-tag}",
    // put any message you want
    channel: "<CHANNEL ID>"
});

Functions: {member-tag} - Returns the member's tag

{member-id} - Returns the member's ID

{guildname} - Returns the Guild's name

Join Message Event

bot.guildMemberAdd({
    // put any message here
    message: "{member-tag} Welcome to {guildname}!",
    channel: "<channel ID>"
});

Functions: {member-tag} - Return the member's tag

{member} - Mentions the member that just joined

{guildname} - Returns the Guild's name

{member-id} - Returns the member's id

{guild-memmber-count} - Returns the Guild's Member Count (Will Include Bots)

Links

Report the bugs on our Discord Server, and/or to our GitHub Repository.

Gydo-JS Discord Server

Dev Branch

Github Repo

1.0.1

3 years ago

1.0.0

3 years ago

0.2.2

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago