Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Commit

Permalink
Merge 6f94bac into dccb37a
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhawk-TA committed Mar 28, 2020
2 parents dccb37a + 6f94bac commit 8a5b17c
Show file tree
Hide file tree
Showing 38 changed files with 1,163 additions and 324 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"avoidEscape": true
}],
"semi": ["error", "always"],
"space-infix-ops": ["error", {"int32Hint": false}],
"space-in-parens": ["error", "never"]
}
}
4 changes: 3 additions & 1 deletion .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
# This is only required for local testing and development
# This file shall be used as a template, enter your bot token and rename the file to .env

DISCORD_TOKEN="<your discord bot token>"
DISCORD_TOKEN=<your discord bot token>
SLACK_TOKEN=<your slack bot token>
COVERALLS_REPO_TOKEN=<your coveralls repo token>
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ coverage
build/

# Documentation
doc/
doc/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Supported events:

Events can be used like this:
```js
Bot.onEvent("<event-name>", (returnValue) => {
Bot.onEvent("<event-name>", function(returnValue) {
//Code that shall be executed when the event was triggered
});
```
Expand All @@ -53,11 +53,11 @@ There is also an example of a simple bot implementation to get started withk:
const {DiscordBot} = require("dynobot-framework");
const Bot = new DiscordBot("<discord-token>");

Bot.onEvent("ready", () => {
Bot.onEvent("ready", function() {
console.log("Bot started");

Bot.onEvent("message", (msg) => {
if (msg.isMentioned(Bot.getClient().getUser())) {
Bot.onEvent("message", function(msg) {
if (msg.isMentioned(Bot.getClient().user)) {
msg.getChannel().send("OK");
}
});
Expand Down
Loading

0 comments on commit 8a5b17c

Please sign in to comment.