Allow trump to be run outside of spam
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s
This commit is contained in:
parent
a9f6911efa
commit
7e6a43214b
1 changed files with 4 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue