Coder Social home page Coder Social logo

staff-request-bot's Introduction

Staff Request Bot

This is an incredibly basic bot that I created as a means to introduce myself to Rust. It allows you to create a requests board for handling user requests.

Building

The bot can be built using the cargo build command. If a release build is desired, you can use cargo build --release. The build artifact will be written within the release or debug directories in the target directory.

Configuration

The bot will read its configuration from the path specified in the STAFFBOT_CFG environment variable OR /usr/local/etc/staffbot.yaml if STAFFBOT_CFG is unset.

The configuration is in YAML format. It should be formed like so:

token: "DISCORDTOKENHERE"
mongo_uri: "mongodb://127.0.0.1:27017/"
bot_prefix: "~"
mongo_database: "staff-requests"

You can create a token in the Discord developer portal if you don't already have one. The bot needs the Message Content intent, the Server Members intent, and the Presence Update intent (the last two are not strictly necessary, but are required for the help command to display correctly per the framework).

Usage

Given ~ as the bot prefix, a new request board can be configured like so (where # prefixed names are channel mentions and @ prefixed names are role mentions):

~setupBoard #requests #archive @Staff

Users will write requests in #requests and the bot will react to the messages with a checkmark and an X. @Staff can press one of the two (adding their own react) to take action on the request, at which point it will be deleted from #requests and sent to #archive.

A request board can be removed like so if and when it is no longer desired:

~removeBoard #requests

Missing Features

  • Attachments are not archived when a message is moved to #archive
  • There is minimal logging currently

License

This package is released under the terms of the MIT license. Please see LICENSE.txt for more information.

staff-request-bot's People

Contributors

aurowora avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.