disbot.js
v1.5.10
Published
A very easy way to make a Discord bot.
Maintainers
Readme
DisBot.JS
A beginner Discord bot library for easy and innovative control over your bot!
Features:
- Commands: Easy methods to create simple commands!
- You can use variables like "{message}", "{args(0)}" (=message), "{arg(0)}", "{user}", "{user.id}", "{guild}", "{guild.id}"
- There are control codes: You can DM the message to any user by typing "{dm(the_users_id)}" - for example DM the message to the message's author: "{dm({user.id})}" - the DM feature will, if no ID is given, DM the message to the mentioned user, or just not send it!
- Global chat: This is the only bot library which has a global chat built in! Ready for you to enable!
DOCS:
Example bot:
const DisBot = require("disbot.js");
const bot = new DisBot("TOKEN");
bot.addCommand("!example1", "This is the reply text! You can use your variables like this: {user}!");
bot.addCommand(".example2", "{dm({user.id})}This is another command! The reply is being sent to the message author!");
bot.addCommand("{global_chat}channel-name", "{user.tag} sent {message} in the global chat 'channel-name'! This message can be changed of course!");
bot.addCommand("!tell", "{dm}This message was sent to you by {user.tag} on {guild}: {args(1)}") //Use args(1) instead of message, to exclude the mention!Objects:
- Client (otherwise known as bot)
- new(token: string) -> this: Client
- addCommand(call: string, answer: string | Function | Message) -> command: Command
- serverCount() -> count: Number
- userCount() -> count: Number
- client: Discord.Client
- Command
- new(client: Discord.Client, call: string, exe: Function) -> this: Command
- disable() -> null
- enable() -> null
- setCall(call: string) -> null
- Message
- new(c: string) -> this: Message
- setEmbed(embed: Embed) -> this: Message
- content: string
- embed: Embed
- Embed
- new(title: string, description: string, color: int) -> this: Embed
- setTitle(s: string) -> this: Embed
- setDescription(s: string) -> this: Embed
- setColor (i: Number) -> this: Embed
