diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 1b6b7a3..1a0c198 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -1006,7 +1006,8 @@ class Ollama(commands.Cog): break await msg.edit(embed=embed) - @commands.command(hidden=True) + @commands.command() + @commands.guild_only() async def trump(self, ctx: commands.Context, max_history: int = 100): async with ctx.channel.typing(): thread_id = self.history.create_thread( @@ -1018,8 +1019,8 @@ class Ollama(commands.Cog): "under 4000 characters. Write only the content to be posted, do not include any pleasantries." " Write using the style of a twitter or facebook post." ) - messages = self.history.get_history(thread_id) - async for message in ctx.channel.history(limit=max_history): + channel = discord.utils.get(ctx.guild.text_channels, name="spam") + async for message in channel.history(limit=max_history): if message.author.id == 1101439218334576742 and len(message.embeds): embed = message.embeds[0] if embed.type == "rich" and embed.colour and embed.colour.value == 0x5448EE: