有没有办法获得公会的通知设置?
例如,每当用户使用!notification
命令时,无论服务器的通知设置是否设置为“所有消息”) @Mentions“
。
这是我想使用它的想法。
@bot.command()
async def notification():
notificationsettings = # Notification settings here
if notificationsettings == "only @mentions":
print("You'll only get mention notifications")
else:
print("You'll get every message notifications")
For example, whenever a user uses the !notification
command, it should print in the console whether the server's notification settings are set to "all messages"
or "only @mentions"
.
Here is an idea of what I'd like to use it for.
@bot.command()
async def notification():
notificationsettings = # Notification settings here
if notificationsettings == "only @mentions":
print("You'll only get mention notifications")
else:
print("You'll get every message notifications")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以通过
guild.default_notifications
属性找到公会的通知级别。这将返回anotification> notification> notificationlevel
目的。A Guild's notification level can be found through the
Guild.default_notifications
attribute. This will return aNotificationLevel
object.