![](https://raw.githubusercontent.com/Tobiti/shinpuru/master/.media/rendered/sp-banner-slim.png)
A simple multi purpose discord bot written in Go (discord.go)
with focus on stability and reliability
Branch | Main CI | Docker CD | Releases CD |
---|---|---|---|
stable | |||
canary |
Here you can choose between the stable or canary version of shinpuru:
シンプル (shinpuru), a simple (as the name says), multi-purpose Discord Bot written in Go, using bwmarrin's package discord.go as API and gateway wrapper and shireikan as command parser. The focus on this bot is to provide general purpose, administration and security tools while keeping stability, reliability and maintainability.
This bot is mainly used as administration and security tool on my development discord. Drop by to see shinpuru in action! 😉
In this wiki article, you can find an automatically generated list of all commands and their manuals.
Following, you will find a selected set of core features of shinpuru.
shinpuru offers a web interface to view members profiles, reports, the guild mod log and also configure the guilds settings for shinpuru like mod log channel, voice log channel or join/leave messages and channels.
shinpuru has a fine grained and highly configurable permission system which uses "permission domains". You can specify permissions for whole groups of commands or for single commands for each role on your guild either by command or using the web interface.
Please read this document about how the permission system exactly works and how to set it up correctly.
shinpuru brings general guild moderation features like clearing messages in text channels (also user-specific, if required), reporting, muting, kicking and banning members. Those actions initiated with shinpurus moderation commands will be logged in a defined moderation text channel and in the database. So, all actions can be reviewed.
Also, there is a notify
system, which creates a @notify
role, which is as standard, not mentionable. Users can get or remove themselves this role by using the notify
command. So, you can use this role as a replacement for @everyone
, so it is like an "opt-in notification system".
You can combine that function with the ment
command, which allows enabling or disabling mentionability of roles by command. If you enable the mentionability of @notify
, for example, and after that, you mention this role in a message, the mentionability of this role will automatically be disabled.
Another feature is the autorole
system: You can specify a role, which will be added to every user joined the guild.
Having trouble with Raids? shinpuru can help you with this by monitoring the rate of joining users and proceeding with security measures like increasing the servers security level.
You can also see the logs of the Antiraid to see if you got raided by Users. These logs can be downloaded or deleted in the web interface.
Of course, there are some chats supporting commands like the say
command, where you can create embedded messages with the bot with custom colors, titles, footers, images, and so on. Also, it is possible to create embeds from raw json data (like documented in Discords API docs). For example, here you can find the format of our development Discord guilds welcome message.
Another useful feature is the quote
command, where you can quote messages from all text channels on a guild in any channel with jump to link. This can be generated by the ID or the URL of a message.
Time for some democracy? So, you can create reaction-interactive votes with the vote
command.
Annoyed from ghost pings (messages with mentions, which were deleted, so you only see a mention but no message)? shinpuru has a system for detecting those ghost pings
and punish people doing so by exposing the message which was deleted actually. You can also specify a format of how the warn message should look like, if you do not want to expose the message content or ping the victim again, for example.
You want to be prepared for each emergency? Just enable the auto-backup system of shinpuru with the backup
command. Then, a full backup of all of the guild roles, channels, members and guild settings will be saved every 12 hours. The last 10 backups are saved, so you have access to backups for the last 5 days. Of course, you can also automatically restore saved backups by using the backup restore
command.
With the Twitch Notification System, you can stay up to date which channels are currently live on Twitch! Just enter the command !twitch <twitchUserName>
in a channel to set up the system. Then, every time, the streamer goes live, a message will be posted to this channel, which will be automatically removed when the channel goes offline on Twitch.
Because of API limitations, the delay until the bot notifies a status change can be up to one minute.
shinpuru is able to "compile" embedded code in messages on the fly, just by clicking a reaction under the message containing the code. The code will be sent to jdoodle's API, will be executed and the output will be displayed in the discord channel!
For setting up this system, use the exec setup
command. Then, the bot will request your jdoodle's API credentials in DM (because we don't want you to send your credentials into a public guilds text chat). Then, the system will be set up and enabled on your guild. Your credentials will only be used for your guild, so every guild is responsible for their credentials. That also means, if you have an advanced jdoodle plan, you can use this accounts credentials, of course, for your guild.
By using the inv
command, you can set up a guild-wide blocking for Discord Guild Invite Links. You can pass a minimum permission level users need to have to be allowed to send Invite Links. If users with a permission level below that, the messages including Invite Links will be deleted.
The system detects obvious invite links like discord.gg/<InvID>
or discordapp.com/invite/<InvID>
. Also, links which redirect to a Discord Invite link using the location
header or some sort of HTML redirection methods, like link shorteners do, for example, will be blocked.
Missing Teamspeak's voice activity log? Just specify a voice log channel with the voicelog
command and every voice channel move will be logged in this channel.
Read about how to host shinpuru using the provided Docker image in the wiki article.
Read about self-compiling in the wiki article.
-
github.com/zekroTJA/shinpuru/pkg/acceptmsg
Package acceptmsg provides a message model for discordgo which can be accepted or declined via message reactions. -
github.com/zekroTJA/shinpuru/pkg/angularservice
Package angularservice provides bindings to start an Angular development server via the Angular CLI. -
github.com/zekroTJA/shinpuru/pkg/argp
Package argp is a stupid simple flag (argument) parser which allows to parse flags without panicing when non-registered flags are passed. -
github.com/zekroTJA/shinpuru/pkg/boolutil
Package boolutil provides simple utility functions around booleans. -
github.com/zekroTJA/shinpuru/pkg/bytecount
Package bytecount provides functionalities to format byte counts. -
github.com/zekroTJA/shinpuru/pkg/checksum
Package checksum provides functions to generate a hash sum from any given object. -
github.com/zekroTJA/shinpuru/pkg/colors
Package color provides general utilities for image/color objects and color codes. -
github.com/zekroTJA/shinpuru/pkg/ctypes
Package ctype provides some custom types with useful function extensions. -
github.com/zekroTJA/shinpuru/pkg/discordoauth
package discordoauth provides fasthttp handlers to authenticate with via the Discord OAuth2 endpoint. -
github.com/zekroTJA/shinpuru/pkg/discordutil
Package discordutil provides general purpose extensuion functionalities for discordgo. -
github.com/zekroTJA/shinpuru/pkg/embedbuilder
Package embedbuilder provides a builder pattern to create discordgo message embeds. -
github.com/zekroTJA/shinpuru/pkg/etag
Package etag implements generation functionalities for the ETag specification of RFC7273 2.3. https://tools.ietf.org/html/rfc7232#section-2.3.1 -
github.com/zekroTJA/shinpuru/pkg/fetch
Package fetch provides functionalities to fetch roles, channels, members and users by so called resolavbles. That means, these functions try to match a member, role or channel by their names, displaynames, IDs or mentions as greedy as prossible. -
github.com/zekroTJA/shinpuru/pkg/hammertime
Package hammertime provides functionailities to format a time.Time into a Discord timestamp mention. The name was used after the very useful web app hammertime.djdavid98.art. -
github.com/zekroTJA/shinpuru/pkg/hashutil
Package hashutil provides general utility functionalities to generate simple and fast hashes with salt and pepper. -
github.com/zekroTJA/shinpuru/pkg/httpreq
Package httpreq provides general utilities for around net/http requests for a simpler API and extra utilities for parsing JSON request and response boddies. -
github.com/zekroTJA/shinpuru/pkg/jdoodle
Package jdoodle provides an API wrapper for the jdoodle execute and credit-spent REST API. -
github.com/zekroTJA/shinpuru/pkg/lctimer
Package lctimer provides a life cycle timer which calls registered callback handlers on timer elapse. This package is a huge buggy piece of crap, please don't use it. :) -
github.com/zekroTJA/shinpuru/pkg/limiter
Package limiter provides a fiber middleware for a bucket based request rate limiter. -
github.com/zekroTJA/shinpuru/pkg/mimefix
Package mimefix provides functionalities to bypass this issue with fasthttp on windows hosts: golang/go#32350* -
github.com/zekroTJA/shinpuru/pkg/msgcollector
Package msgcollector provides functionalities to collect messages in a channel in conect of a single command request. -
github.com/zekroTJA/shinpuru/pkg/multierror
Package multierror impements handling multiple errors as one error object. -
github.com/zekroTJA/shinpuru/pkg/onetimeauth
Package onetimeout provides short duration valid JWT tokens which are only valid exactly once. -
github.com/zekroTJA/shinpuru/pkg/permissions
Package permissions provides functionalities to calculate, update and merge arrays of permission domain rules. Read this to get more information about how permission domains and rules are working: https://github.com/zekroTJA/shinpuru/wiki/Permissions-Guide -
github.com/zekroTJA/shinpuru/pkg/random
Package random provides some general purpose cryptographically pseudo-random utilities. -
github.com/zekroTJA/shinpuru/pkg/roleutil
Package roleutil provides general purpose utilities for discordgo.Role objects and arrays. -
github.com/zekroTJA/shinpuru/pkg/startuptime
Package startuptime provides simple functionalities to measure the startup time of an application. -
github.com/zekroTJA/shinpuru/pkg/stringutil
Package stringutil provides generl string utility functions. -
github.com/zekroTJA/shinpuru/pkg/thumbnail
Package thumbnail provides simple functionalities to generate thumbnails from images with a max witdh or height. -
github.com/zekroTJA/shinpuru/pkg/timerstack
Package timerstack provides a timer which can execute multiple delayed functions one after one. -
github.com/zekroTJA/shinpuru/pkg/timeutil
Package timeutil provides some general purpose functionalities around the time package. -
github.com/zekroTJA/shinpuru/pkg/twitchnotify
Package twitchnotify provides functionalities to watch the state of twitch streams and notifying changes by polling the twitch REST API. -
github.com/zekroTJA/shinpuru/pkg/voidbuffer
Package voidbuffer provides a simple, concurrency proof push buffer with a fixed size which "removes" firstly pushed values when fully filled.
- bwmarrin/discordgo
(v0.23.2)
- bwmarrin/snowflake
(v0.3.0)
- dgrijalva/jwt-go
(v3.2.0+incompatible)
- esimov/stackblur-go
(v1.0.0)
- gabriel-vasile/mimetype
(v1.3.0)
- generaltso/vibrant
(v0.0.0-20200703055536-90f922bee78c)
- ghodss/yaml
(v1.0.0)
- go-ping/ping
(v0.0.0-20210506233800-ff8be3320020)
- redis/v8
(v8.11.0)
- go-sql-driver/mysql
(v1.6.0)
- fiber/v2
(v2.12.0)
- makeworld-the-better-one/go-isemoji
(v1.1.0)
- minio/minio-go
(v6.0.14+incompatible)
- narqo/go-badge
(v0.0.0-20190124110329-d9415e4e1e9f)
- prometheus/client_golang
(v1.11.0)
- qiangxue/fasthttp-routing
(v0.0.0-20160225050629-6ccdc2a18d87)
- ranna-go/ranna
(v0.1.0)
- cron/v3
(v3.0.1)
- sahilm/fuzzy
(v0.1.0)
- di/v2
(v2.4.2)
- sirupsen/logrus
(v1.8.1)
- stretchr/testify
(v1.7.0)
- traefik/paerser
(v0.1.4)
- valyala/fasthttp
(v1.26.0)
- wcharczuk/go-chart
(v2.0.1+incompatible)
- zekroTJA/colorname
(v1.0.0)
- zekroTJA/ratelimit
(v1.0.0)
- zekroTJA/shireikan
(v0.7.0)
- zekroTJA/timedmap
(v1.4.0)
- x/image
(v0.0.0-20210607152325-775e3b0c77b9)
- x/sys
(v0.0.0-20210630005230-0f9fa26af87c)
- x/time
(v0.0.0-20210611083556-38a9dc6acbc6)
- Avatar used from album 御中元 魔法少女詰め合わせ made by 瑞希
- Icons uded from Material Icons Set
- Discord Icon used from Discord's Branding Resources
Copyright © 2018-2021 zekro Development (Ringo Hoffmann).
Covered by MIT License.