discord-hackweek-2019

module
v0.0.0-...-e28099a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2019 License: Apache-2.0

README

Discord Hack Week 2019

About

The purpose of this bot was to try a different way of executing kicks and bans rather than trying to make as many commands as possible for this event, so don't expect too many commands :D

Instead of chaining everything in a single command with an argument spliterator such as ';' which most bots do, which gets messy, this bot uses multi stage commands also known as "command menus".

Commands

  • Prefix: m.
  • ban @user - Activates the ban menu to ban the mentioned users.
  • kick @user - Activates the kick menu to kick the mentioned users.
  • logchannel #channel - Sets the log channel to send moderation logs to, this must be set.
  • ping - Pong! with the latency (round trip of message send and receive) time.
  • warn @user - Activates the warn menu to warn the mentioned users.

Host

The bot is hosted by myself until the event officially ends on Tuesday. The bot can be added using this link: https://discordapp.com/api/oauth2/authorize?client_id=593898637222739987&permissions=76934&scope=bot

Self Setup

Requirements

  • Golang 1.12
  • MongoDB

Environment variables

  • DISCORD_HACK_WEEK_2019_TOKEN - This is your bot token
  • DISCORD_HACK_WEEK_2019_MONGODB - This is your MongoDB URI in the form mongodb://[username:password@]host1[:port1][,...hostN[:portN]]][/[database][?options]], see https://docs.mongodb.com/manual/reference/connection-string/. If you are Discord staff testing the bot, feel free to DM me to get the URI to my MongoDB cloud instance.

Install Go

  • Ensure you have Go 1.12 installed.

Run the bot

  • Clone the repo; as this uses Go modules, it does not need to be placed in the Go path.
  • Open your command shell and navigate to the repo folder.
  • Fetch all required dependencies for the bot: go get ./...
  • Run the bot: go run main/main.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL