gydo-js v1.0.1
Gydo-JS
The Main branch of Gydo-JS (Stable Branch)
Report bugs in our Discord Server
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.
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago