gpt4 book ai didi

python - getChatMembersCount 远程机器人

转载 作者:太空宇宙 更新时间:2023-11-03 14:05:15 24 4
gpt4 key购买 nike

我的代码:

import telebot
bot = telebot.TeleBot(constants.token)

@bot.message_handler(commands=['roll'])
def handle_command(message):
roll = random.randint(1, 100)
bot.send_message(message.chat.id, roll)
bot.getChatMembersCount()


bot.polling(none_stop=True, interval=0)

错误:

AttributeError: 'TeleBot' object has no attribute 'getChatMembersCount'

如何使用“getChatMembersCount”?

P。 S.我用https://github.com/eternnoir/pyTelegramBotAPI

最佳答案

它称为 get_chat_members_count ( direct link to implementation )。

来自https://github.com/eternnoir/pyTelegramBotAPI/ :

Methods

All API methods are located in the TeleBot class. They are renamed to follow common Python naming conventions. E.g. getMe is renamed to get_me and sendMessage to send_message.

关于python - getChatMembersCount 远程机器人,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48945023/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com