【问题标题】:How to get Discord Member Online Status in Python without bot?如何在没有机器人的情况下在 Python 中获取 Discord 会员在线状态?
【发布时间】:2022-01-09 19:47:54
【问题描述】:

所以我想用python打印我朋友的在线状态但没有bot,代码如下:

from discord import (what should I import?)
from time import sleep

isFriendOnline = "False"
while True:
    sleep(1)
    new_isFriendOnline = (<discord get member online status placeholder>)
    if isFriendOnline != new_isFriendOnline and new_isFriendOnline == False:
        print("Friend is offline now")
    elif isFriendOnline != new_isFriendOnline and new_isFriendOnline == True:
        print("Friend is online now")
    elif isFriendOnline == new_isFriendOnline:
        pass

那我该写什么呢?

【问题讨论】:

    标签: python discord member status


    【解决方案1】:

    找到相同的问题,请下次多做研究。

    How would I detect user status? || Discord.py

    【讨论】:

    • 没有discord bot可以吗?
    • 不,您必须使用 discord 而不是 API。如果成员也不在与成员相同的服务器中,不确定这是否会起作用。
    • 这不是一个“相同的问题”。这只是一个类似的。
    猜你喜欢
    • 2021-12-31
    • 1970-01-01
    • 1970-01-01
    • 2020-05-20
    • 2012-08-05
    • 1970-01-01
    • 2018-12-04
    • 2018-09-02
    • 2021-04-01
    相关资源
    最近更新 更多