mirror of
https://github.com/polyjitter/searchbot-discord.git
synced 2024-08-14 22:46:55 +00:00
Added Example
This commit is contained in:
parent
cdcb94639a
commit
30c6991868
2 changed files with 6 additions and 4 deletions
BIN
example.webp
Normal file
BIN
example.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
10
main.py
10
main.py
|
@ -1,8 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# search - a tiny little search utility bot for discord
|
||||
# Used and modified with permission
|
||||
# search - a tiny little search utility bot for discord.
|
||||
# All original work by taciturasa, with some code by ry00001.
|
||||
# Used and modified with permission.
|
||||
# See LICENSE for license information.
|
||||
|
||||
'''Main File'''
|
||||
|
||||
|
@ -93,8 +94,9 @@ async def search_logic(query: str):
|
|||
instance = random.sample(instances.read().split('\n'), k=1)
|
||||
print(instance)
|
||||
|
||||
error_msg = (f"There was a problem with `{instance[0]}`. Please contact "
|
||||
f"**{bot.appinfo.owner}** to have it removed.")
|
||||
error_msg = ("**An error occured!**\n\n"
|
||||
f"There was a problem with `{instance[0]}`. Please try again later.\n"
|
||||
f"_If problems with this instance persist, contact`{bot.appinfo.owner}` to have it removed._")
|
||||
|
||||
# Create the URL to make an API call to
|
||||
call = f'{instance[0]}/search?q={query}&format=json&language=en-US'
|
||||
|
|
Loading…
Reference in a new issue