def setUp(self):
     super().setUp()
     message = Message(TextChannel(1, 1), User(1, "TestUser"), "This is the start of a command message.")
     self.options = mapper_index(self.client, message, timeout_seconds=20)
     for i in range(0, 20):
         self.options.add_option(option_calls_coroutine("{}".format(i), "", self.helper_set_counter(i)))
     self.value = 0
Example #2
0
 async def InsightOption_setMention(self, message_object: discord.Message):
     """Set overall mention mode - Select the mention mode for any killmail posted to this feed."""
     options = dOpt.mapper_index(self.cfeed.discord_client, message_object)
     options.set_main_header(
         "Select the mention mode for this feed. Any killmail posted to this feed can optionally "
         "mention Discord channel users.")
     options.add_option(
         dOpt.option_returns_object("No mention",
                                    return_object=enum_mention.noMention))
     options.add_option(
         dOpt.option_returns_object("@ here",
                                    return_object=enum_mention.here))
     options.add_option(
         dOpt.option_returns_object("@ everyone",
                                    return_object=enum_mention.everyone))
     row = await self.get_cached_copy()
     row.mention = await options()
     await self.save_row(row)
     await self.reload(message_object)
Example #3
0
 def setUp(self):
     super().setUp()
     self.client = DiscordInsightClient.DiscordInsightClient()
     message = Message(TextChannel(1, 1), User(1, "TestUser"), "This is the start of a command message.")
     self.options = mapper_index(self.client, message, timeout_seconds=1)
     self.options.add_option(option_returns_object("1", "", 1))
Example #4
0
 def setUp(self):
     super().setUp()
     self.client = DiscordInsightClient.DiscordInsightClient()
     message = Message(TextChannel(1, 1), User(1, "TestUser"), "This is the start of a command message.")
     self.options = mapper_index(self.client, message)
     self.counter = 0