Suppress embeds in messages.

This commit is contained in:
OK
2023-03-23 18:50:31 +01:00
parent a781f737b0
commit 2e848db333
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ class TestFunctionality(TestBotBase):
message = self.create_message("Hello there! How are you?")
with patch.object(openai.ChatCompletion, 'acreate', new=acreate):
await self.bot.on_message(message)
message.channel.send.assert_called_once_with("Hello!")
message.channel.send.assert_called_once_with("Hello!", suppress_embeds=True)
async def test_on_message_event2(self) -> None:
async def acreate(*a, **kw):
@@ -85,7 +85,7 @@ class TestFunctionality(TestBotBase):
message = self.create_message("Hello there! How are you?")
with patch.object(openai.ChatCompletion, 'acreate', new=acreate):
await self.bot.on_message(message)
message.channel.send.assert_called_once_with("Hello!")
message.channel.send.assert_called_once_with("Hello!", suppress_embeds=True)
async def test_on_message_event3(self) -> None:
async def acreate(*a, **kw):
@@ -132,7 +132,7 @@ class TestFunctionality(TestBotBase):
patch.object(logging, 'warning', logging_warning), \
patch.object(aiohttp.ClientSession, 'get', new=image):
await self.bot.on_message(message)
message.channel.send.assert_called_once_with("Hello!", files=[ANY])
message.channel.send.assert_called_once_with("Hello!", files=[ANY], suppress_embeds=True)
if __name__ == "__mait__":