Something changed

This commit is contained in:
Roberto Anic Banic 2017-10-16 09:40:34 +00:00
parent ebc6e6b45f
commit 6d200f0ef7
2 changed files with 115 additions and 1 deletions

108
.gitignore vendored Normal file
View File

@ -0,0 +1,108 @@
# Created by .ignore support plugin (hsz.mobi)
### Python template
# 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/
*.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/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
.static_storage/
.media/
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# 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/
.idea

8
bot.py
View File

@ -13,7 +13,12 @@ rpcs3Bot = Bot(command_prefix="!")
pattern = '[A-z]{4}\\d{5}'
@rpcs3Bot.event
async def on_message(message):
asyncio.async
def on_message(message):
if message.author.name == "RPCS3 Bot":
return
try:
@ -116,6 +121,7 @@ async def search(url, ctx, *args, limit=-1, search_title=None, query=None):
jsonn = requests.get(url).text
data = json.loads(jsonn)
if data["return_code"] == -3:
print(url)
return await rpcs3Bot.send_message(discord.Object(id=channelid), "{}, Illegal search".format(ctx.message.author.mention))
if data["return_code"] == -2:
return await rpcs3Bot.send_message(discord.Object(id=channelid), "Please be patient API is in maintenance mode!")