• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

KoalaBotUK/KoalaBot: All in one Discord bot for student societies & communit ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

KoalaBotUK/KoalaBot

开源软件地址:

https://github.com/KoalaBotUK/KoalaBot

开源编程语言:

Python 99.7%

开源软件介绍:

KoalaBot

Discord Server GitHub Workflow Status Codecov Language grade: Python

KoalaBot is a free open source discord bot being developed by students from around the UK. Our aim is to ensure university society committee leaders can access all they need and from one easy to use discord bot to improve their server and society!

Developers

All of our other amazing developers can be seen on our website https://koalabot.uk

See also the list of contributors to this repo.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

This application uses python 3.8 which you can download here

All python packages you need can be found in the requirements.txt. Before running the bot you must install these as so:

$ pip3 install -r requirements.txt

Linux

On linux, database encryption will be enabled. Therefore, further packages are needed.

$ sudo apt install libsqlcipher-dev

Environment Variables

Before running the bot you will need to create a .env file in the root directory of this project. A template for this can be found here:

# Discord Bot
DISCORD_TOKEN = AdiSc0RdT0k3N # A discord Token taken from the discord developers portal 
BOT_OWNER = 123456789 # (optional) A discord ID for the person who should have access to owner commands (will default to bot owner)

# Encryption (optional)
ENCRYPTED = False # or True (default) for disabling/enabling the database encryption
SQLITE_KEY = 123EXAMPLE456ENCRYPTION789KEY0 # A custom SQLcipher key
CONFIG_PATH = ./config # directory of logs and database (default=./config)

# Twitch Alert (Required for TwitchAlert Extension)
TWITCH_TOKEN = tw1tch70k3n # Twitch Token taken from the twitch developers portal
TWITCH_SECRET = tw1tch53cr3t # Twitch Secret taken from the twitch developers portal

# Verification (Required for Verify Extension)
GMAIL_EMAIL = [email protected] # email for a gmail account
GMAIL_PASSWORD = example_password123 # password for the same gmail account

# API
API_PORT = 8080 # port for the API to listen on (default=8080)
`DISCORD_TOKEN` is the only required environment variable for KoalaBot to be run.

## Running the tests
Tests are run using the pytest library
```bash
$ pytest tests

Running KoalaBot

If all prerequisites have been followed, you can start KoalaBot with the following command

$ python3 koalabot.py

Running KoalaBot with Docker

Here are some example snippets to help you get started creating a container.

docker-compose (recommended, click here for more info)

---
version: "3.9"
services:
  transmission:
    image: jaydwee/koalabot
    container_name: KoalaBot
    environment:
      - DISCORD_TOKEN = bot_token
      - BOT_OWNER = owner_user_id #optional
      - ENCRYPTED = boolean #optional
      - SQLITE_KEY = key #optional
      - TWITCH_TOKEN = twitch_application_token #optional (TwitchAlert)
      - TWITCH_SECRET = twitch_application_secret #optional (TwitchAlert)
      - GMAIL_EMAIL = [email protected] #optional (Verify)
      - GMAIL_PASSWORD = example_password123 #optional (Verify)
    volumes:
      - <path to data>:/config
    restart: unless-stopped

docker cli (click here for more info)

docker run \
  --name=Koala \
  -e DISCORD_TOKEN=bot_token \
  -e BOT_OWNER=owner_user_id `#optional` \
  -e ENCRYPTED=boolean `#optional` \
  -e SQLITE_KEY=key `#optional` \
  -e TWITCH_TOKEN=twitch_application_token `#optional (TwitchAlert)` \
  -e TWITCH_SECRET=twitch_application_secret `#optional (TwitchAlert)` \
  -e [email protected] `#optional (Verify)` \
  -e GMAIL_PASSWORD=example_password123 `#optional (Verify)` \
  -v <path to data>:/config \
  --restart unless-stopped \
  jaydwee/koalabot

Using Env File

Add --env-file .env to your command

Versions

jaydwee/koalabot:latest The latest stable release
jaydwee/koalabot:prerelease The latest prerelease
jaydwee/koalabot:master The current state of the master branch
jaydwee/koalabot:v<x.y.z> The specified version of KoalaBot

Links




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap