-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(WIP): move to pycord did some logger messages * fix: setting.json * refactor: language.pref * del: language.py * refactor: localization * fix: sync script loop over nested dict * refactor: some remaining command in main * feat: change status uptime to timestamp * fix: improved error msg logic * fix: clean content for error message * fix: change all relative paths into dirname relative paths might causes error if working dir is not at file dir of main.py * fix: localization sync error * WIP: add logging handler for all cmd files * opt: log message datefmt WIP: log messgaes for all commands/interactions * feat: all log messages for error * fix: log formatting issue * feat: help menu with buttons * fix: remove tags for cmds * fix: relative path for cmds/event * feat: log info from discordpy package * feat: logs and timestamp * loc: localizations of v3.0.2 * fix: timestamp parsing * refactor: move docs to README * refactor: rename main.py * fix: check dir, format, discordpy2.0
- Loading branch information
Showing
45 changed files
with
2,379 additions
and
2,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
.idea | ||
setting.json | ||
localization/locales/ | ||
localization/sync_to_en.py | ||
localization/.gitignore |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,28 @@ | ||
# DiscordBotExt | ||
[![Documentation Status](https://readthedocs.org/projects/discordbotextension/badge/?version=latest)](https://discordbotextension.readthedocs.io/zh_TW/latest/?badge=latest) | ||
[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dlonnstyle%26type%3Dpatrons&style=flat)](https://patreon.com/lonnstyle) | ||
[![GitHub release](https://img.shields.io/github/release/lonnstyle/DiscordBotExt.svg)](https://github.com/lonnstyle/DiscordBotExt/releases) | ||
[![GitHub license](https://img.shields.io/github/license/lonnstyle/DiscordBotExt.svg)](https://github.com/lonnstyle/DiscordBotExt/blob/main/LICENSE) | ||
[![Github all releases](https://img.shields.io/github/downloads/lonnstyle/DiscordBotExt/total.svg)](https://GitHub.com/lonnstyle/DiscordBotExt/releases/) | ||
[![Discord](https://img.shields.io/discord/815462037840330762.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/MdZxTNkpGF) | ||
<br/> | ||
Warframe Discord 機器人<br/> | ||
基於[MeowXiaoXiang](https://github.com/MeowXiaoXiang/Meow_Bot-Public_Version-/commits?author=MeowXiaoXiang)的[Meow_Bot-Public_Version-](https://github.com/MeowXiaoXiang/Meow_Bot-Public_Version-)開發的Mod<br/> | ||
與[Meow_Bot-Public_Version-](https://github.com/MeowXiaoXiang/Meow_Bot-Public_Version-)兼容,但[main.py](main.py)為調整過後的優化版本,兼容性更佳 | ||
A Discord Bot with multiple extensions<br/> | ||
This bot is developed base on [MeowXiaoXiang](https://github.com/MeowXiaoXiang/Meow_Bot-Public_Version-/commits?author=MeowXiaoXiang)'s[Meow_Bot-Public_Version-](https://github.com/MeowXiaoXiang/Meow_Bot-Public_Version-)<br/> | ||
It is compatible with [Meow_Bot-Public_Version-](https://github.com/MeowXiaoXiang/Meow_Bot-Public_Version-),but[main.py](main.py)is highly configured and have higher compatibilities with extensions.<br/> | ||
_**Please be noted that v3 is not compatible with v2 as changed to [discord.py](https://github.com/Rapptz/discord.py) v2**_ | ||
|
||
## 第三方庫列表<br/> | ||
* -pip install discord | ||
* -pip install chinese_converter | ||
* -pip install discord-webhook | ||
* -pip install mwclient | ||
* -pip install fuzzywuzzy | ||
* -pip install flask | ||
* -pip install discord-py-slash-command | ||
## packages<br/> | ||
* **Please refer to [requirements.txt](requirements.txt)** | ||
|
||
## Mod列表<br/> | ||
* [worldState.py](cmds/worldState.py)查詢當前世界循環狀態<br/> | ||
* 使用[WFCD](https://github.com/WFCD/)的[API](https://docs.warframestat.us/)數據 | ||
* [rivenPrice.py](cmds/rivenPrice.py)查詢[wfm](https://warframe.market)上最低價格的五張該武器紫卡<br/> | ||
* 必須搭配[dict](dict)當中的[Weapons.json](Weapons.json)以及[attributes.json](attributes.json)使用 | ||
* [Weapons.json]當中的武器名稱有機會不齊全,若有無法查詢的武器且你確保自己沒有輸入錯誤,請向我回報bug | ||
* [baro.py](cmds/baro.py)查詢虛空商人Baro Ki'Teer的目前狀態<br/> | ||
* 感謝[pa001024](https://github.com/pa001024)允許使用[riven.im](https://riven.im)項目的繁體翻譯檔[zh-Hant.json](https://raw.githubusercontent.com/lonnstyle/riven-mirror/dev/src/i18n/lang/zh-Hant.json)作為Dict | ||
-pip install chinese-converter | ||
* [wfm.py](cmds/wfm.py)查詢物品於[wfm](https://warframe.market)上的訂單<br/> | ||
-pip install discord-webhook | ||
* 請在setting.json當中加入以下數據(可選): | ||
"webhook": "<你的webhook URL>" | ||
* <s>自定義暱稱:[Google Sheet](https://docs.google.com/spreadsheets/d/1AMxTBp1_HdVbjdxnpTGqy_16OoP-CBeBc9117ZXGhEQ/edit?usp=sharing)</s> | ||
* [wiki.py](cmds/wiki.py)生成wiki鏈接<br/> | ||
-pip install mwclient | ||
-pip install fuzzywuzzy | ||
* 查詢順序為[簡中](https://warframe.huijiwiki.com)→[繁中](https://warframe.fandom.com/zh-tw)→[英文](https://warframe.fandom.com) | ||
|
||
## 指令列表<br/> | ||
* 請於安裝機器人後使用**help**指令查看 | ||
## command list<br/> | ||
* Please refer to **help** command of the bot | ||
|
||
## 安裝機器人<br/> | ||
* 將本repo下載,刪去[dict](dict)文件夾(會自動下載本repo當中的最新版本) | ||
* 填寫[setting.json](setting.json)當中留空的部分 | ||
* [Token](https://discord.com/developers/applications)與[Webhook](https://support.discord.com/hc/zh-tw/articles/228383668-%E4%BD%BF%E7%94%A8%E7%B6%B2%E7%B5%A1%E9%89%A4%E6%89%8B-Webhooks-)請按照Discord官方的設置獲取 | ||
* 安裝前述的 **-pip install 第三方庫** | ||
* 到你的[Discord開發者頁面](https://discord.com/developers/applications)邀請你的機器人進伺服器 | ||
* 執行[main.py](main.py),你就會看到你的機器人上線啦 | ||
## Install the bot<br/> | ||
* Fill in the blank arguments of [setting.json](setting.json) | ||
* Please get the [Token](https://discord.com/developers/applications) and [Webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) according to Discord's official instruction. | ||
* Install the packages in [requirements.txt](requirements.txt) | ||
* `pip install -r requirements.txt` | ||
* Invite your bot to the server from [Discord Developer Portal](https://discord.com/developers/applications) | ||
* Execute [main.py](main.py) to start the bot. | ||
<br/><br/> | ||
<a href="https://www.patreon.com/bePatron?u=47066858" data-patreon-widget-type="贊助lonnstyle開發機器人">贊助lonnstyle開發機器人</a> | ||
<a href="https://www.patreon.com/bePatron?u=47066858" data-patreon-widget-type="Support lonnstyle to develop the bot">Support lonnstyle to develop the bot</a> |
Oops, something went wrong.