Giter Site home page Giter Site logo

dismote's Introduction

dismote ("emote stealer") bot

Minimal Discord bot which listens on the provided channels as defined in the configuration file, parses a users message accordingly and adds any found emotes to the server. Both static and animated emotes are supported granted the server has enough emote slots left.

Getting started

Configuration

You'll find a yaml configuration in this repository that the bot will use. The variables are as follows:

  • owner (str, default: User ID of connecting account): User ID of the owner with elevated bot privileges. See commands for according permissions.
  • bot (bool): true if running as a bot and false if running as a self-bot (not recommended since self-bots are in violation of the Discord ToS).
  • token (str): Bot/account token.
  • channels (array): Array of channels to listen on.
  • prefix (str, default: +): Command prefix.

Note: the configuration file ("config.yaml") must be in the same diectory as the binary or it won't be found, you can specify a custom path by passing the config flag ("-c") to dismote.

You can conveniently reload the current settings by sending a SIGHUP signal to the PID of dismote. Likewise for SIGTERM that terminates the appplication.

$ kill -HUP `pidof dismote` # Reload the settings
$ kill -TERM `pidof dismote` # Gracefully terminate the application

Building/running

I've include a Makefile to save a few keystrokes. To build, it's as simple as:

$ make build # Build the resulting ("dismote") binary
/usr/local/bin/go build -ldflags="-s -w" -o dismote
$ ./dismote
2020/09/17 15:34:18 Loaded configuration file ("config.yaml")
2020/09/17 15:34:19 Successfully started Discord session
2020/09/17 15:34:19 Now listening on 2 channel(s)
--- truncated ---

Logs are outputted to the terminal, so it's suggested running the application inside tmux or screen to background the process.

Commands

Whilst dismote offers little functionality it does come with a few handy commands. Command functions can be found here.

Command Description Permission
help Prints available commands All
info Displays servers statistics All
clear Bulk delete channel messages Owner
listen Set listening status Owner

Implicity, the "stealer" command is set for the default command to be ran. To readily add emotes to a server you must be in a channel that's listed in the settings, from there type out the emotes you want added. Note: messages that don't start with an emote are ignored and will not be added.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.