2.0.14 • Published 4 years ago

disclient v2.0.14

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago
npm i disclient --save
yarn add --save disclient
const { Client } = require("disclient");
const bot = new Client("SECRET-TOKEN");

bot.build().then(() => {
  console.log("bot logged in")
});
const { Client } = require("disclient");
const bot = new Client("SECRET-TOKEN");

bot.on("READY", () => {
  console.log("Bot logged in");
});
 
// it was not good to console.log after the bot.build() function so just do the console.log in the READY event.
bot.build();
const { Client } = require("disclient");
const bot = new Client("SECRET-TOKEN");

bot.on("READY", () => {
  console.log(`${bot.user.tag} is online`);
});

bot.on("MESSAGE_CREATE", async (message) => {
  console.log(message.content);
});

bot.build();
const { Client } = require("disclient");
const bot = new Client("SECRET-TOKEN");

bot.on("READY", () => {
  console.log(`${bot.user.tag} is online`);
});

bot.on("MESSAGE_CREATE", async (message) => {
  if(message.content === "!ping"){
    message.channel.sendMessage("Pong!")
  }
});

bot.build();
const { Client } = require("disclient");
const bot = new Client("SECRET-TOKEN");

bot.on("READY", () => {
  console.log(`${bot.user.tag} is online`);
});

bot.on("MESSAGE_CREATE", async (message) => {
  if(message.content === "!hello"){
    message.channel.reply("Hello World");
  }
});

bot.build();
const { Client, Embed } = require("disclient");
const bot = new Client("SECRET-TOKEN");

bot.on("READY", () => {
  console.log(`${bot.user.tag} is online`);
});

bot.on("MESSAGE_CREATE", async (message) => {
  if(message.content === "!ping"){
    const embed = new Embed()
    embed.setTitle("Pong!")
    embed.setDescription("This is the desc")
    const embed1 = embed.create();

    message.channel.sendMessage("Some Message", { embeds: [embed1] });
  }
});

bot.build();
const { Client } = require("disclient");
const bot = new Client("SECRET-TOKEN");

bot.on("READY", () => {
  console.log(`${bot.user.tag} is online`);
});

bot.on("MESSAGE_CREATE", async (message) => {
  if(message.content === "!react"){
    message.react("😂");
  }
});

bot.build();
2.0.14

4 years ago

2.0.13

4 years ago

2.0.12

4 years ago

2.0.11

4 years ago

2.0.10

4 years ago

2.0.3

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1-security

4 years ago