mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
✨ Support intents
This commit is contained in:
parent
723ccfaa21
commit
44545c4266
2 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "royalnet-discordpy"
|
name = "royalnet-discordpy"
|
||||||
version = "0.5.7"
|
version = "0.5.8"
|
||||||
description = "A Discord.py-based frontend for the royalnet.engineer module."
|
description = "A Discord.py-based frontend for the royalnet.engineer module."
|
||||||
authors = ["Stefano Pigozzi <me@steffo.eu>"]
|
authors = ["Stefano Pigozzi <me@steffo.eu>"]
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
|
|
|
@ -4,6 +4,7 @@ The PDA ("main" class) for the :mod:`royalnet_telethon` frontend.
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import discord
|
||||||
import royalnet.royaltyping as t
|
import royalnet.royaltyping as t
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
@ -37,7 +38,8 @@ class DiscordpyPDAImplementation(engi.ConversationListImplementation):
|
||||||
return "discordpy"
|
return "discordpy"
|
||||||
|
|
||||||
def __init__(self, name: str, bot_token: str,
|
def __init__(self, name: str, bot_token: str,
|
||||||
mode: DiscordpyPDAMode = DiscordpyPDAMode.CHANNEL_USER):
|
mode: DiscordpyPDAMode = DiscordpyPDAMode.CHANNEL_USER,
|
||||||
|
intents: discord.Intents = discord.Intents.default()):
|
||||||
|
|
||||||
super().__init__(name=name)
|
super().__init__(name=name)
|
||||||
|
|
||||||
|
@ -83,7 +85,7 @@ class DiscordpyPDAImplementation(engi.ConversationListImplementation):
|
||||||
projectile=DiscordMessageDeleted(event=message)
|
projectile=DiscordMessageDeleted(event=message)
|
||||||
)
|
)
|
||||||
|
|
||||||
self.client: d.Client = CustomClient()
|
self.client: d.Client = CustomClient(intents=intents)
|
||||||
"""
|
"""
|
||||||
.. todo:: Document this.
|
.. todo:: Document this.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue