Kard-bot

command module
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 7 Imported by: 0

README

Kard-bot

A Discord bot destined for greatness.

Features

  • Respond to user greetings and goodbyes
  • DnD dice roller
  • Copy-pastas when requested and/or when triggered
  • Uwu-ifier
  • Creepy asterisks
  • Mock certain questions or phrases
  • "Quack" any time a user types an expletive
  • Subscribe to social media accounts (maybe a webhook would be more appropriate?)
  • Play music via youtube à la rythm bot
  • Configurably replace words with other words

Installation

This bot is not currently hosted anywhere. If you want to use it, you can always try hosting it yourself! :)

Hosting Installation

Hosting this bot requires a Discord Bot Token. You can generate one by visiting the Discord Developer Portal, and then creating a new application with an accompanying bot. Give the bot its needed permissions in the OAuth2 section (Be sure to tick the "applications.commands" box!), and then invite it to your server(s) using the link that is generated for you.

For now, you will have to build the Kard-bot binary yourself. Free-time permitting, I may provide a released version or docker image.

Assuming you have the Go runtime installed, you can install Kard-bot with a simple shell command.

go install github.com/TannerKvarfordt/Kard-bot

In order to authenticate with Discord, Kard-bot looks for the KARDBOT_TOKEN environment variable. It is recommended to place that variable in a .env file at the root of the project. Note that existing environment variables take precedence over anything in the .env file.

KARDBOT_TOKEN="Your bot token here"

With your token in place, you can simply run the Kard-bot binary to bring it to life! For a more robust running solution, consider creating a systemd service or something similar to suit your needs.

Some commands are restricted so that only the bot owner can run them. The bot owner is specified by the KARDBOT_OWNER_ID environment variable. It can be set in the same manner as the KARDBOT_TOKEN variable. Its value should be the user ID of the bot owner. Note that this is not the same as the owner's username. The user ID is a unique ID assigned by Discord. You can retrieve it by enabling developer mode in your Discord client, right clicking a user, and selecting "Copy ID".

References

Useful resources for writing a Discord bot.

Discord API Wrappers
Documentation
Tutorials

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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