小编Mic*_*siO的帖子

如何在 on_member_join()discord.py 中向成员发送私人消息?

这就是我所拥有的:

@client.command(pass_context=True)
@client.event
async def on_member_join(ctx, member):
    print(f'{member} has joined a server.')
    await ctx.send(f"Hello {member}!")
    await ctx.member.send(f"Welcome to the server!")
Run Code Online (Sandbox Code Playgroud)

我需要机器人在加入时发送包含规则和命令列表的私人消息。

请帮忙!

python python-3.x discord.py

5
推荐指数
1
解决办法
3万
查看次数

从 firebase.firestore.Timestamp.now() 中减去一周?

我如何从时间戳中减去一周firebase.firestore.Timestamp.now()?我有不同的带有时间戳的文档,我需要构建一个函数来检查这些文档中是否有任何文档的时间戳早于 7 天。哎呀,也许有一个内置函数可以检查日期是否“过期”?提前致谢。

javascript firebase google-cloud-functions google-cloud-firestore

1
推荐指数
1
解决办法
1287
查看次数