mirror of
https://github.com/polyjitter/searchbot-discord.git
synced 2024-08-14 22:46:55 +00:00
Changed gitignore, moved description to config
This commit is contained in:
parent
2e2f0c9dc8
commit
aa5c64c6e5
2 changed files with 58 additions and 4 deletions
55
.gitignore
vendored
55
.gitignore
vendored
|
@ -1,4 +1,53 @@
|
|||
# Bot Related
|
||||
config.json
|
||||
extensions/__pycache__/developer.cpython-38.pyc
|
||||
extensions/__pycache__/search.cpython-38.pyc
|
||||
extensions/__pycache__/botlist.cpython-38.pyc
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
bin/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.tox/
|
||||
.coverage
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
# Rope
|
||||
.ropeproject
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
*.pot
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
7
main.py
7
main.py
|
@ -30,6 +30,7 @@ class Bot(commands.Bot):
|
|||
self.prefix = self.config.get('PREFIX')
|
||||
self.version = self.config.get('VERSION')
|
||||
self.maintenance = self.config.get('MAINTENANCE')
|
||||
self.description = self.config.get('DESCRIPTION')
|
||||
|
||||
# Get Instances
|
||||
with open('searxes.txt') as f:
|
||||
|
@ -50,6 +51,10 @@ class Bot(commands.Bot):
|
|||
async def on_ready(self):
|
||||
self.request = aiohttp.ClientSession()
|
||||
self.appinfo = await self.application_info()
|
||||
|
||||
if self.description == '':
|
||||
self.description = self.appinfo.description
|
||||
|
||||
# EXTENSION ENTRY POINT
|
||||
self.load_extension('extensions.core')
|
||||
|
||||
|
@ -62,6 +67,7 @@ class Bot(commands.Bot):
|
|||
print(msg)
|
||||
|
||||
async def on_message(self, message):
|
||||
|
||||
mentions = [self.user.mention, f'<@!{self.user.id}>']
|
||||
ctx = await self.get_context(message)
|
||||
|
||||
|
@ -83,7 +89,6 @@ class Bot(commands.Bot):
|
|||
|
||||
|
||||
bot = Bot(
|
||||
description='search - a tiny little search utility bot for discord.',
|
||||
case_insensitive=True)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue