예제 #1
0
 async def get_user_dm(self, message_object: discord.Message):
     try:
         assert isinstance(message_object, discord.Message)
         await message_object.author.send(
             "Opening a new conversation! Hello!")
         dm = message_object.author.dm_channel
         return cType.insight_directMessage(dm, self.service)
     except Exception as ex:
         print(ex)
예제 #2
0
 async def get_user_dm(self, message_object: discord.Message):
     assert isinstance(message_object, discord.Message)
     async with (await LimitManager.cm_hp(message_object.channel)):
         await message_object.author.send("--- Hello! ---")
     dm = message_object.author.dm_channel
     author_object = message_object.author
     return cType.insight_directMessage(dm,
                                        self.service,
                                        author_object=author_object)
예제 #3
0
 async def get_channel_feed(self, channel_object: discord.TextChannel):
     try:
         assert isinstance(channel_object, discord.TextChannel)
         __feed_obj = self.__channel_feed_container.get(channel_object.id)
         if __feed_obj is not None:
             return __feed_obj
         else:
             __ch_feed_type = await self.__already_exists(channel_object.id)
             if __ch_feed_type is not None:
                 return await self.__add_channel(channel_object,
                                                 __ch_feed_type)
             else:
                 return cType.insight_textChannel_NoFeed(
                     channel_object, self.service)
     except AssertionError:
         assert isinstance(channel_object, discord.DMChannel)
         return cType.insight_directMessage(channel_object, self.service)