kaulketh / ledpibot

Raspberry PI - Control WS2812B neopixel RGB LED stripe via Telegram API using telepot framework.
https://kaulketh.github.io/ledpibot/
The Unlicense
2 stars 0 forks source link

secret.py #35

Closed specs32 closed 4 years ago

specs32 commented 4 years ago

hello, great project, i would like to try it out, but i have trouble creating the required files for the bot to run ... could you provide a sample configuration for the secrets and all required files please !

kaulketh commented 4 years ago

hello, here an example for "secret.py"

#!/usr/bin/python3
# -*- coding: utf-8 -*-

# github (if required)
access_token_to_github = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# chat id's of allowed users/admin of the created telegram bot
annib = 123456789
thk = 123456789
# token of bot (get from telegram botFather)
token = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
kaulketh commented 4 years ago

dont forget to update access.py if any changes at variables in secret.py

#!/usr/bin/python3
# -*- coding: utf-8 -*-

__author___ = "Thomas Kaulke"
__email__ = "kaulketh@gmail.com"
__maintainer___ = "Thomas Kaulke"
__status__ = "Production"

from . import secret

# github
access_token_to_github = secret.access_token_to_github

# bot
annib = secret.annib
thk = secret.thk
token = secret.token

if __name__ == '__main__':
    pass

furthermore maybe its needed to update the admins list/array in the bot classes telepotBot.py line 32 admins = [access.thk, access.annib] telegramBot.py line 30 admins = [access.thk, access.annib]

kaulketh commented 4 years ago

More information can be found in readme, manual. Also refer hardware description.

kaulketh commented 4 years ago

Additionally if you want to update the program stuff and it is stored on github its required to adapt update.py line 14 - 17

GIT = "https://github.com/kaulketh/ledpibot.git"
HOME_PI_BOT = "/home/pi/bot"
PROJECT = "ledpibot"
SECRET = "secret.py"
specs32 commented 4 years ago

Thank you ! got it working right away...