diff options
author | ziro <palembani@gmail.com> | 2020-08-05 03:53:17 +0000 |
---|---|---|
committer | ziro <palembani@gmail.com> | 2020-08-05 03:53:17 +0000 |
commit | c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc (patch) | |
tree | 8b0c2fd8fecb9df61b33bd5998aafc0425b34070 /zibot.py | |
parent | 7e3f3e006d3cf29001e3990375d028dc9c91b757 (diff) | |
download | steve-bot-c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc.tar steve-bot-c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc.tar.gz steve-bot-c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc.tar.bz2 steve-bot-c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc.tar.lz steve-bot-c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc.tar.xz steve-bot-c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc.tar.zst steve-bot-c69d0ff2cfcf9de0c162e27e75cb6f6a945c61bc.zip |
+ Tweaking
Diffstat (limited to 'zibot.py')
-rw-r--r-- | zibot.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/zibot.py b/zibot.py new file mode 100644 index 0000000..3b965d1 --- /dev/null +++ b/zibot.py @@ -0,0 +1,21 @@ +import asyncio +import json +from bot import ziBot + +def check_jsons(): + try: + f = open('config.json', 'r') + except FileNotFoundError: + token = input('Enter your bot\'s token: ') + with open('config.json', 'w+') as f: + json.dump({"token": token}, f, indent=4) + +def init_bot(): + bot = ziBot() + with open('config.json', 'r') as f: + data=json.load(f) + bot.run() + +if __name__ == "__main__": + check_jsons() + init_bot() |