Giter VIP home page Giter VIP logo

Comments (17)

scmanjarrez avatar scmanjarrez commented on June 8, 2024 2

I'll update the README with clear instructions, I'm sorry!

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024 1

Wait, you should replace the text "telegram_id" with your actual uid, e.g.

"accounts": {
        "123132132": {

123132132 should be replaced with the uid returned from the bot

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024

Did you create a .config.json file with your information? Have you opened the ports on your vps? Seems like telegram server can't contact with your telegram bot

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

i did. i have opened ports on vps panel, but it's not working anyways. ufw is disabled

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024

Try changing from webhooks to polling, that way we can check if you're getting updates from telegram server; comment from line 86 to line 97 in paimon.py and uncomment line 98

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

it seems like it doesn't get any updates
image

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024

Change the debug level in

 logging.basicConfig(
        format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
        level=logging.INFO
    )

from INFO to DEBUG and paste the trace (or check that you're receiving OK when the bot is doing HTTP requests)

Don't forget to remove sensitive information from the trace, like bot tokens or genshin tokens.

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

it gets my commands like it should but i have no reply
image

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024

Did you check your telegram uid? If the server connection is working fine, it implies that you're not being marked as "allowed" in the bot. Check

if your uid is passing the check of allowed clients

    uid = ut.uid(update)
	print(allowed(uid))

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

where do i set uid? in .config.json? if so, i've set my id to match telegram id, the same it reports in logs

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024

Yes, .config.json. After adding the line above (print allowed), are your receiving True? Or just remove the if allowed line, and keep only the ut.send (removing 1 block of identation)

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

i can't add line, bot stops working. trying to do it now...

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024

It should be like this

async def bot_help(update: Update, context: ut.Context) -> None:
    uid = ut.uid(update)
    await ut.send(update, HELP)

You should receive at least a response from /start and /help commands

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

yup, it's replying now

from genshin-impact-stats-telegram-bot.

scmanjarrez avatar scmanjarrez commented on June 8, 2024

Then, your telegram uid isn't correct.
Use this to set the telegram uid in config.json:

async def bot_help(update: Update, context: ut.Context) -> None:
    uid = ut.uid(update)
    await ut.send(update, f"Your telegram uid is: {uid}")

The bot will send you a message with your uid, use that in config.json

"accounts": {
        "uid here like, i.e., 123132132": {

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

uid is exactly the same as i entered it before
do i need to set it like

"accounts": {
        "uid here like, i.e., 123132132": {

?

image

from genshin-impact-stats-telegram-bot.

DenSwitch avatar DenSwitch commented on June 8, 2024

fine, it works now. instructions unclear, need to be something like "REPLACE_THIS_WITH_YOUR_TELEGRAM_ID" for people like me :)
thanks a lot!

from genshin-impact-stats-telegram-bot.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.