OpasiumAI

Opasium AI was specifically designed for the Opasium Games discord only. It is a bot that covers the basic functions of any other bot.

Installing

  • Clone the repository:

git clone https://github.com/DanixGuy/OpasiumAI
cd OpasiumAI
  • Create virtual environment (optional):

python3 -m venv env
env\Scripts\activate
  • Install requirements

pip install -r requirements.txt

Configuration

import os

# Discord bot's token
# Don't share the token with anyone else!

# By default, this will get the token from environment variables but you can specify your token:
# DISCORD_TOKEN = "your token goes here"
DISCORD_TOKEN = os.getenv("DISCORD_TOKEN")

# PostgreSQL connection string
# This bot uses PostgreSQL database to store all giveaways

# Example of PostgreSQL connection:
# POSTGRESQL_CONNECTION_STRING = "postgres://host/dbname?user=username&password=password"

# host - ip address of database
# dbname - name of database to connect to
# username - user's name
# password - user's password

# Don't share the password with anyone else!
POSTGRESQL_CONNECTION_STRING = os.getenv("POSTGRESQL_CONNECTION_STRING")

# Giveaway's reward max length
GIVEAWAY_MAX_REWARD_STRING_LENGTH = 32

# Giveaway check interval
# Every GIVEAWAY_CHECK_INTERVAL seconds all giveaways will be checked if they should end or not
GIVEAWAY_CHECK_INTERVAL = 10

# Bot's status
# Will be displayed as: "Playing /help | Opasium Games"
BOT_STATUS = "/help | Opasium Games"

Prefix

The bot’s prefix is /

Commands

Moderation

  • kick (user) (reason) – Kick someone (requires Kick Members permission)
  • ban (user) (reason) – Ban someone (requires Ban Members permission)
  • nick (user) (new nickname) – Change someone’s nickname (requires Manage Nicknames permission)
  • say (text) – Say something via the bot
  • purge (limit [optional]) – Delete messages in bulk (requires Manage Messages permission)
  • poll (description) – Make a poll
  • gstart (reward) (time) (winners) – Create a giveaway (requires Manage Messages permission)
  • gend (message id of the giveaway) – End a giveaway (requires Manage Messages permission)

Fun

  • dogpic – Random dog picture
  • flipcoin – Flip a coin
  • dice – Throw a dice
  • avatar (user [optional]) – Get your own or someone else’s avatar

Other

  • members – Check how many members there are in current server
  • userinfo (user) – Gather some info about someone
  • ping – Check the bot’s ping

GitHub

View Github