Code Monkey home page Code Monkey logo

mtvdiscordbot's Introduction

MTV Discord Bot

A discord bot to facilitate r/mealtimevideo discord server. The bot will (eventually):

  • Tracks community-trust based on vote reacts given on user submissions
  • Manages user submissions to restricted video channels in order to present a streamlined experience to users
    • Submissions are rate-limited based on built user trust and account age

Install

Local

git clone https://github.com/FoxxMD/MTVDiscordBot.git .
cd MTVDiscordBot
nvm use # optional, to set correct Node version
npm install
npm build
npm start

Docker

git clone https://github.com/FoxxMD/MTVDiscordBot.git .
cd MTVDiscordBot

Or foxxmd/mtv-discord-bot:latest

If using a config file modify the volumes property in docker-compose.yml to point to your config folder.

docker-compose up -d

Setup

Create a Discord Bot

You will need to provide:

  • Discord Bot Token -- created when you initially made the bot
  • Oauth2 Client ID -- Found on the OAuth2 section in the bot's application page

See config.yaml.example.

  • For local installations this should be located in PROJECT_DIR/data/config.yaml
  • For docker mount a folder into container at /config IE docker run ... -v /path/on/host/config:/config

Optional Setup

Highly recommended. Create Youtube and Vimeo application credentials. These will enable these features:

  • Automatic title and video duration parsing for these platforms
  • Automatic Creator entity creation from videos with full IDs, NSFW flags, and popular flags
  • Creator association to Discord users for these platforms

Usage

All interaction with the bot is done through Discord Slash Commands.

The below usage is an overview and not ehxuastive documentation. Each command has its own description and options that can be discovered through discord.

Moderator

/settings

Display or set guild-level bot behavior such as setting channel categories for showcase posts, setting allowed video min/max length, setting firehose channel...

/roles

Display and manage special MTV role type associated to Discord roles. Role types are associated to a discord role and give users that have those roles special behavior within MTV Bot.

Roles include:

  • Approved - Users with this role type can bypass the age check for submission.
  • Janitor - TBD
  • TOS - If any discord roles are associated with this role type then users using /submit must have one of these roles in order to submit (AKA read-the-rules verification role)
  • Content Creator - Discord role to set/unset on a User when they are given or have a creator associated removed.

/creators

Manage discord user associations to platform creators. Only supported for Youtube and Vimeo creators (and only if their APIs are enabled with valid configs).

Users who are associated will get the Content Creator associated discord role, be able to bypass the 20% self-promo rule for their own channels, and will be mentioned in video submissions/showcase posts.

Public

/submit

The command used to submit a new submission to the Firehose channel.

/standing

Used to display stats/level/summaries for users.

mtvdiscordbot's People

Contributors

foxxmd avatar

Watchers

 avatar  avatar

mtvdiscordbot's Issues

Implement automatic video submission reporting using reaction

MTV Bot will react with โŒ on new video submissions but it doesn't do anything currently.

Need to define:

  • (if any) How many normal user reacts are required to action
  • How many approved user reacts are required to action

Need to think about how best to prevent abuse of this and how to action based on number of reacts IE

  • should some low number of X reports to #safety-logs?
  • should some higher number X reports auto remove?

Handle timestamps on submissions

A user may want to submit a video with a timestamp that skips an intro or jumps to the relevant part of the video.

This should be allowed but currently for supported platforms we are parsing the video (plain) and posting that -- stripping timestamps.

Additionally, we should add a followup message if timestamp is detected on /submit command to confirm with the user it was intentional.

Implement creator CRUD commands

Implement commands to allow mods to assign creator status to a user:

  • Need a command (or options) to search/create a valid creator using youtube or vimeo channel id
    • Command needs to associate user on upsert
    • Command needs to add creator role
  • Need a command to remove association

Consolidate all fields into vido embed

Would love to be able to have all fields (creator, submitted by, etc..) by included on the same embed discord creates for the video preview but this is not currently possible.

Editing the generated preview embed (after sending the message) causes the video player to disappear

image

Creating an embed on the initial message causes the video embed to act as a normal link (no video player)

image

This seems to be a limitation of the current API and what discord allows you to do:

For the embed object, you can set every field except type, provider, video, and any height, width, or proxy_url values for images.

Implement reddit integration system

Automatically post popular videos from /r/mealtimevideos to community channels given these requirements:

  • Reddit submission is 24 hours old
    • Submission has X number of upvotes (or is ranked on top/hot?)
  • Video has not already been submitted to #firehose by a discord user

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.