Skip to content
πŸ€– BecauseOfProg's Discord bot
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
src
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
config.sample.json
core.rb
run.rb

README.md

logo

Boite Γ  bois

literally "box of wood"

The French Discord bot of the BecauseOfProg.

Website - Discord server

🌈 Features

  • Play games many games, singleplayer or multiplayer
  • Get the current weather and weather forecast for any city in the world
  • Send very nice GIF
  • Search for posts and users of our blog

πŸ“² Requirements

⏩ First start

To use it, you must setup config.json (there is example with the samples). When it's configured, you can start the bot with this command :

ruby run.rb

After that, the bot is ready and you can add it to your guild (Guide)

πŸ”§ Creating commands

To create a new command, you only must create a file in /src/commands/ of the name of your command. In this file, you have to require command.rb and set the namespace to BoiteABois::Commands. The class should inherit from Command. When you add a new command, you must restart the bot. Here is an example :

require_relative 'command'

module BoiteABois
  module Commands
    class Example < Command

      CATEGORY = 'default' # Command category, defined in the config
      USAGE = 'example' # Command usage
      DESC = 'Description' # Command description
      #LISTEN = ['public', 'private'] # Listen for messages from public or private channel
      #ALIAS = 'another_command' # Alias to another command
      #SHOW = true # Visibility in the command list
      #CHANNELS = [] # Array of authorized channels
      #ROLES = [] # Array of authorized user roles
      #MEMBERS = [] # Array of authorized members

      def self.exec(args, context)
        # context is an instance of Discordrb::Message
        # args is an array of arguments
      end

    end
  end
end

πŸ“š Creating database models

All the models are defined in two files :

  • lib/db/models : the Ruby class
  • lib/db/schemas : the database schema, if required

The schemas are in the YML format. All is documented on the mongocore gem page

πŸ“œ Credits

πŸ” License

GNU GPL v3

You can’t perform that action at this time.