From 44545c4266b1df240d074800ba6ded75346c0994 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 30 Apr 2021 01:19:32 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Support=20intents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- royalnet_discordpy/pda.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b156ae6a..e6b25508 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "AGPL-3.0-or-later" diff --git a/royalnet_discordpy/pda.py b/royalnet_discordpy/pda.py index 57731485..761c9257 100644 --- a/royalnet_discordpy/pda.py +++ b/royalnet_discordpy/pda.py @@ -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. """