Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botkit-discord

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botkit-discord

A Botkit connector for Discord allowing you to create extensible Discord bots.

  • 0.0.2
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-20.93%
Maintainers
1
Weekly downloads
 
Created
Source

botkit-discord

🤖👾 A Botkit connector for Discord

This Botkit connector would not be possible without the powerful and simple library, izy521/discord.io.

Note this is still a work in progress and open to additional features and suggestions

Usage

const BotkitDiscord = require('botkit-discord');
const config = {
    token: '**' // Discord bot token
}

const discordBot = BotkitDiscord(config);

discordBot.hears('hello','direct_message',(bot, message) => {
    bot.reply('how goes there :)!')
});

Refer to Botkit documentation to utilize all of the other Botkit features.

Events

You can handle particular events for your bot using the .on() method.

discordBot.on(EVENT_NAME, event => {
	// do stuff
});

Incoming Events

EventDescription
direct_messagethe bot received a direct message from a user
direct_mentionthe bot was addressed directly in a channel ("@bot hello")
mentionthe bot was mentioned by someone in a message ("hello @bot")

Bot Activity Events

EventDescription
disconnectBot has disconnected or failed to login
readyBot is connected

Guild Events

Guilds can also be referred to "server"

EventDescription
guild_member_addA member added to guild (server)
guild_member_updateAn existing guild member has bene updated
guild_member_removeA member removed from guild
guild_role_createA new guild role created
guild_role_updateAn existing guild role has been updated
guild_role_deleteA guild role deleted
channel_createA channel has been create
channel_updateAn existing channel has been updated
channel_deleteA channel has been deleted

API

For convenience the following methods from discord.io library is available on the controller.api

  • setPresence
  • editUserInfo
  • getAllUsers
  • fixMessage
  • simulateTyping
  • getMessage
  • getMessages
  • editMessage
  • deleteMessage
  • pinMessage
  • deletePinnedMessage

License

Ⓒ MIT (Brandon Him / brh55)

Please let me know if you plan on forking or would like professional support.

Keywords

FAQs

Package last updated on 03 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc