1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 11:34:18 +00:00

Support intents

This commit is contained in:
Steffo 2021-04-30 01:19:32 +02:00
parent 723ccfaa21
commit 44545c4266
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "royalnet-discordpy"
version = "0.5.7"
version = "0.5.8"
description = "A Discord.py-based frontend for the royalnet.engineer module."
authors = ["Stefano Pigozzi <me@steffo.eu>"]
license = "AGPL-3.0-or-later"

View file

@ -4,6 +4,7 @@ The PDA ("main" class) for the :mod:`royalnet_telethon` frontend.
from __future__ import annotations
import discord
import royalnet.royaltyping as t
import logging
@ -37,7 +38,8 @@ class DiscordpyPDAImplementation(engi.ConversationListImplementation):
return "discordpy"
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)
@ -83,7 +85,7 @@ class DiscordpyPDAImplementation(engi.ConversationListImplementation):
projectile=DiscordMessageDeleted(event=message)
)
self.client: d.Client = CustomClient()
self.client: d.Client = CustomClient(intents=intents)
"""
.. todo:: Document this.
"""