Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Sylviettee/Comrade

Repository files navigation

Comrade

Docs

Comrade is a safe, lightweight framework built using Moonscript

Features of Comrade

  • Safe and easy embeds
  • Robust command system
  • Built in help system
  • Unit testing support
  • Unopinionated
  • Moonscript support
  • Lightweight
  • Argument parsing system

Bots using Comrade

If your bot uses Comrade send an issue with it.

Example

import Command from require 'comrade'

class commandname extends Command
  new: =>
    super!

    @name = '' -- Override class name
    @aliases = {''}
    @permissions = {''} -- Uses overrides like if they have Moderation we can override them not having kick members
    @hidden = false -- It won't appear in help and can only be ran by an owner
    @allowDMS = false
    @cooldown = 3000 -- Comes in with a built in MS parser so it can say '3 minutes remaining' or '3 hours'

    @description = ''
    @usage = ''
    @example = ''
  
  subcommand: (msg, args, client) =>
    -- I only run when you say commandname subcommand
    msg\reply 'Subcommand!'

  execute: (msg, args, client) =>
    -- Command logic
    @help msg.channel -- Send the help message

commandname!

You can find more examples at the documentation

Documentation

The documentation can be located at https://sovietkitsune.github.io/Comrade.

If you have any issues you can join the support Discord here in the #comrade channel.

Installation

You can install it using lit. To install run

lit install SovietKitsune/Comrade

Lightweight

The Comrade library takes up very little space already, being less than an mb.

Credits

Todo

  • Examples be an array
  • Fixed preconditions
  • Check embed limits
  • Unload events and separation for plugin and commands
  • Examples for documentation
  • More advanced argument parsing system
  • More test cases
  • Pagination

Scrapped

  • Branched prompts Phased out by etlua prompts, check an example. here