https://github.com/svakode/svachan
Svachan is a multi-purpose Discord bot
https://github.com/svakode/svachan
bot discord go svachan
Last synced: 6 months ago
JSON representation
Svachan is a multi-purpose Discord bot
- Host: GitHub
- URL: https://github.com/svakode/svachan
- Owner: svakode
- License: mit
- Created: 2020-09-06T14:24:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T10:49:36.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T15:54:12.849Z (about 2 years ago)
- Topics: bot, discord, go, svachan
- Language: Go
- Homepage:
- Size: 935 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Svachan

[](https://travis-ci.com/svakode/svachan)
Svachan is a [Go](https://golang.org/) Discord Bot. This bot is built on top of [DiscordGo](https://github.com/bwmarrin/discordgo) Multi purposes bot which can be extended
as much as you want, from handling an event in Discord to adding your own custom command!
## Getting Started
### Installing
This assumes you already have a working Go environment, if not please see
[this page](https://golang.org/doc/install) first.
After you clone your project, you need to run
```
make copy-config
```
Open the generated `application.yml` and fill in the required configuration. The configuration is
not required for external parties (e.g Twitter & Google). If empty then we will not register the command to Svachan.
### Build
You can build the binary file by simply running
```
make build
```
After the build is done, you can run it by
```
./out/svachan
```
### Handler Extension
You can extend the bot to handle more event by creating the handler function in `handler` package and registering it in the `main.go`.
Register your handler in the `svachan` variable. For example:
```go
svachan.AddHandler(Handler.CommandHandler)
```
Refer to [this page](https://discord.com/developers/docs/topics/gateway#commands-and-events) for more information about events.
### Command
You can extend the bot to handle more command by creating the handler function in `cmd` package and registering it in the `main.go`.
Register your handler in the `registerCommand()` function. For example:
```go
CmdHandler.Register(constant.HelpCommand, cmd.HelpCommand)
```
### Built-in Command
| Command | Trigger | Description |
| ----------- | ----------- | ----------- |
| Ask | s.ask | Answer your yes/no question|
| Choose | s.choose | Choose one of given options|
| Help | s.help | Showing instruction on how to use |
| Meet | s.meet | Initiate a Google Meet with your team |
| Member | s.member | Managing your member data in the server |
| Music | s.music | Playing music in your server |
| Tweet | s.tweet | Listening to users tweet and repost it in the channel |
| Server | s.server | Showing server status where Svachan is hosted |
## Credit
Made with :heart: by [Hansen Edrick Harianto](https://github.com/hansenedrickh)