NadekoBot/README.md

156 lines
9.5 KiB
Markdown
Raw Normal View History

2015-12-05 10:13:23 +00:00
# NadekoBot
2015-12-05 11:02:45 +00:00
2016-01-05 10:03:33 +00:00
Nadeko Discord chatbot written in C# using Discord.net library.
2015-12-05 11:25:40 +00:00
You can also create a very basic web-ui with the data that is in the Parse DB. [example](http://www.nadekobot.tk)
2015-12-05 11:02:45 +00:00
2016-01-08 08:36:02 +00:00
##This section will guide you through how to setup NadekoBot from the source code
#### If you want to semi-easily setup the bot, go to [releases](https://github.com/Kwoth/NadekoBot/releases)
2016-01-06 05:54:40 +00:00
After you have cloned this repo, move the libopus and libsodium from the DLLs folder to the bin/debug. And after removing all of Discord.Net's project references, add other dlls from dll folder as a reference. Those are part of the libraries you will need for your project. The other part should resolve after you start the project for the first time. All the references are shown [in this image.](http://icecream.me/uploads/72738d3b2797e46767e10820998ad5b3.png)
2015-12-05 11:02:45 +00:00
In your bin/debug folder (or next to your exe), you must have a file called 'credentials.json' in which you will store all the necessary data to make the bot know who the owner is, where to store data, etc.
**This is how the credentials.json should look like:**
```json
{
"Username":"bot_email",
"BotMention":"<@bot_id>",
2015-12-05 11:02:45 +00:00
"Password":"bot_password",
"GoogleAPIKey":"google_api_key",
"OwnerID":123123123123,
"ParseID":"parse_app_id",
"ParseKey":"parse_api_key",
"TrelloAppKey": "your_trello_app_key"
2015-12-05 11:02:45 +00:00
}
```
##### You can omit:
- Parse keys if you don't want logging
- googleAPIKey if you don't want music
- TrelloAppKey if you don't need trello notifications
2016-01-11 19:10:47 +00:00
```json
{
"Username":"bot_email",
"BotMention":"<@bot_id>",
"Password":"bot_password",
"OwnerID":123123123123,
}
```
2016-01-11 18:39:55 +00:00
- BotMention(bot\_id) and OwnerID are **NOT** names of the owner and the bot. If you do not know the id of your bot, put 2 random numbers in those fields, run the bot and do `.uid @MyBotName` - that will give you your bot\_id, do the same for yourself `.uid @MyName` and copy the numbers in their respective fields.
2015-12-05 11:02:45 +00:00
- For google api key, you need to enable URL shortner and Youtube video search in the dev console.
2016-01-04 05:46:53 +00:00
- For **ParseID** and **ParseKey**, you need to register on http://www.parse.com, get those values and create an app with these 3 classes: `'CommandsRan', 'Requests' and 'Stats'` in order to make the logging work.
2016-01-05 05:20:12 +00:00
- If you have **Windows7**, you need to install [Parse.Api](https://www.nuget.org/packages/Parse.Api/) instead of the library that comes with this project
2016-01-12 16:28:51 +00:00
- If you want to have music, you need to download FFMPEG from this link http://ffmpeg.zeranoe.com/builds/ (static build version) and add ffmpeg/bin folder to your PATH environment variable. You do that by opening explorer -> right click 'This PC' -> properties -> advanced system settings -> In the top part, there is a PATH field, add `;` to the end and then your ffmpeg install location /bin (for example ;C:\ffmpeg-5.6.7\bin) and save. Open command prompt and type ffmpeg to see if you added it correctly. If it says "command not found" then you made a mistake somewhere. There are a lot of guides on the internet on how to add stuff to your PATH, check them out if you are stuck.
2015-12-05 11:02:45 +00:00
Download [this folder](http://s000.tinyupload.com/index.php?file_id=54172283263968075500) which contains images and add it next to your .exe in order to make the $draw, $flip, rip and similar functions work.
You should replace nadeko's image with the image of your bot in order to make the hide/unhide commands work as intended.
2016-01-05 23:13:26 +00:00
You should **remove** Discord.Net projects from your solution, and use DLLs instead, as instructed above.
2015-12-05 11:02:45 +00:00
**You are all set.**
Fire up visual studio, wait for it to resolve dependencies and start NadekoBot.
Enjoy
2015-12-05 11:25:40 +00:00
2015-12-09 23:05:02 +00:00
##List of commands
(may be incomplete) last updated: 20.1.2016
2016-01-05 10:02:20 +00:00
Official repo: **github.com/Kwoth/NadekoBot/**
### Administration
2016-01-20 18:00:43 +00:00
Command and aliases | Description | Usage
2016-01-05 10:02:20 +00:00
----------------|--------------|-------
2016-01-20 18:00:43 +00:00
`-h`, `-help`, `@BotName help`, `@BotName h` | Help command
2016-01-05 10:02:20 +00:00
`-hgit` | Help command stylized for github readme
2016-01-20 18:00:43 +00:00
`.sr`, `.setrole` | Sets a role for a given user. | .sr @User Guest
`.rr`, `.removerole` | Removes a role from a given user. | .rr @User Admin
`.r`, `.role`, `.cr` | Creates a role with a given name, and color. | .r AwesomeRole Orange
`.b`, `.ban` | Bans a mentioned user
`.ub`, `.unban` | Unbans a mentioned user
`.k`, `.kick` | Kicks a mentioned user.
2016-01-05 10:02:20 +00:00
`.rvch` | Removes a voice channel with a given name.
2016-01-20 18:00:43 +00:00
`.vch`, `.cvch` | Creates a new voice channel with a given name.
`.rch`, `.rtch` | Removes a text channel with a given name.
`.ch`, `.tch` | Creates a new text channel with a given name.
`.st`, `.settopic` | Sets a topic on the current channel.
`.uid`, `.userid` | Shows user id
`.cid`, `.channelid` | Shows current channel id
`.sid`, `.serverid` | Shows current server id
2016-01-05 10:02:20 +00:00
`.stats` | Shows some basic stats for nadeko
2016-01-20 17:53:18 +00:00
`.leaveall` | Nadeko leaves all servers
2016-01-11 18:57:05 +00:00
`.prune` | Prunes a number of messages from the current channel. | .prune 50
`.die` | Works only for the owner. Shuts the bot down.
`.clr` | Clears some of nadeko's messages from the current channel.
`.newname` | Give the bot a new name.
2016-01-12 22:00:49 +00:00
`.greet` | Enables or Disables anouncements on the current channel when someone joins the server.
`.greetmsg` | Sets a new announce message. Type %user% if you want to mention the new member. | .greetmsg Welcome to the server, %user%.
2016-01-20 17:53:18 +00:00
`.bye` | Enables or Disables anouncements on the current channel when someone leaves the server.
`.byemsg` | Sets a new announce leave message. Type %user% if you want to mention the new member. | .byemsg %user% has left the server.
2016-01-05 10:02:20 +00:00
### Conversations
2016-01-20 18:00:43 +00:00
Command and aliases | Description | Usage
2016-01-05 10:02:20 +00:00
----------------|--------------|-------
`\o\` | Nadeko replies with /o/
`/o/` | Nadeko replies with \o\
2016-01-20 18:00:43 +00:00
`@BotName copyme`, `@BotName cm` | Nadeko starts copying everything you say. Disable with cs
`@BotName cs`, `@BotName copystop` | Nadeko stops copying you
2016-01-11 18:57:05 +00:00
`@BotName uptime` | Shows how long is Nadeko running for.
2016-01-05 10:02:20 +00:00
`@BotName die` | Works only for the owner. Shuts the bot down.
2016-01-11 18:57:05 +00:00
`@BotName randserver` | Generates an invite to a random server and prints some stats.
`@BotName do you love me` | Replies with positive answer only to the bot owner.
2016-01-05 10:02:20 +00:00
`@BotName how are you` | Replies positive only if bot owner is online.
`@BotName insult` | Only works for owner. Insults @X person. | @NadekoBot insult @X.
`@BotName praise` | Only works for owner. Praises @X person. | @NadekoBot praise @X.
`@BotName are you real` | Useless.
2016-01-20 18:00:43 +00:00
`@BotName are you there`, `@BotName !`, `@BotName ?` | Checks if nadeko is operational.
2016-01-05 10:02:20 +00:00
`@BotName draw` | Nadeko instructs you to type $draw. Gambling functions start with $
`@BotName fire` | Shows a unicode fire message. Optional parameter [x] tells her how many times to repeat the fire. | @NadekoBot fire [x]
`@BotName rip` | Shows a grave image.Optional parameter [@X] instructs her to put X's name on the grave. | @NadekoBot rip [@X]
2016-01-11 18:57:05 +00:00
`@BotName j` | Joins a server using a code.
2016-01-20 18:00:43 +00:00
`@BotName save`, `@BotName ,s`, `@BotName -s` | Saves something for the owner in a file.
2016-01-05 10:02:20 +00:00
`@BotName ls` | Shows all saved items.
`@BotName slm` | Shows the message where you were last mentioned in this channel (checks last 10k messages)
`@BotName cs` | Deletes all saves
`@BotName bb` | Says bye to someone. | @NadekoBot bb @X
2016-01-20 18:00:43 +00:00
`@BotName req`, `@BotName ,request`, `@BotName -request` | Requests a feature for nadeko. | @NadekoBot req new_feature
2016-01-05 10:02:20 +00:00
`@BotName lr` | PMs the user all current nadeko requests.
`@BotName dr` | Deletes a request. Only owner is able to do this.
`@BotName rr` | Resolves a request. Only owner is able to do this.
`@BotName call` | Useless. Writes calling @X to chat. | @NadekoBot call @X
`@BotName hide` | Hides nadeko in plain sight!11!!
`@BotName unhide` | Unhides nadeko in plain sight!1!!1
`@BotName dump` | Dumps all of the invites it can to dump.txt
2016-01-20 18:00:43 +00:00
`@BotName av`, `@BotName avatar` | Shows a mentioned person's avatar. | ~av @X
2016-01-05 10:02:20 +00:00
### Gambling
2016-01-20 18:00:43 +00:00
Command and aliases | Description | Usage
2016-01-05 10:02:20 +00:00
----------------|--------------|-------
`$draw` | Draws a card from the deck.If you supply number [x], she draws up to 5 cards from the deck. | $draw [x]
`$flip` | Flips a coin, heads or tails, and shows an image of it.
`$roll` | Rolls 2 dice from 0-10. If you supply a number [x] it rolls up to 30 normal dice. | $roll [x]
### Games
2016-01-20 18:00:43 +00:00
Command and aliases | Description | Usage
2016-01-05 10:02:20 +00:00
----------------|--------------|-------
2016-01-20 18:00:43 +00:00
`t`, `-t` | Starts a game of trivia.
`tl`, `-tl`, `tlb`, `-tlb` | Shows a current trivia leaderboard.
`tq`, `-tq` | Quits current trivia after current question.
2016-01-05 10:02:20 +00:00
`>` | Attack a person. Supported attacks: 'splash', 'strike', 'burn', 'surge'. | > strike @User
`poketype` | Gets the users element type. Use this to do more damage with strike
### Music
2016-01-20 18:00:43 +00:00
Command and aliases | Description | Usage
2016-01-05 10:02:20 +00:00
----------------|--------------|-------
2016-01-20 18:00:43 +00:00
`!m n`, `!m next` | Goes to the next song in the queue.
`!m s`, `!m stop` | Completely stops the music and unbinds the bot from the channel and cleanes up files.
`!m p`, `!m pause` | Pauses the song
`!m q`, `!m yq` | Queue a song using a multi/single word name. | `!m q Dream Of Venice`
`!m lq`, `!m ls`, `!m lp` | Lists up to 10 currently queued songs.
2016-01-05 10:02:20 +00:00
`!m sh` | Shuffles the current playlist.
### Searches
2016-01-20 18:00:43 +00:00
Command and aliases | Description | Usage
2016-01-05 10:02:20 +00:00
----------------|--------------|-------
`~yt` | Queries youtubes and embeds the first result
2016-01-20 18:00:43 +00:00
`~ani`, `~anime`, `~aq` | Queries anilist for an anime and shows the first result.
`~mang`, `~manga`, `~mq` | Queries anilist for a manga and shows the first result.
2016-01-11 18:57:05 +00:00
`~randomcat` | Shows a random cat image.