36 lines
980 B
Python
36 lines
980 B
Python
|
import discord
|
||
|
from discord.ext import commands
|
||
|
from jimmy.config import *
|
||
|
from jimmy.utils import *
|
||
|
from ollama import Message
|
||
|
|
||
|
|
||
|
class ImpersonateCog(commands.Cog):
|
||
|
def __init__(self, bot):
|
||
|
self.bot = bot
|
||
|
|
||
|
impersonate = discord.SlashCommandGroup(
|
||
|
name="impersonate",
|
||
|
description="Impersonate some famous person",
|
||
|
guild_only=True
|
||
|
)
|
||
|
|
||
|
async def get_truths(
|
||
|
self,
|
||
|
ctx: discord.ApplicationContext,
|
||
|
author: str,
|
||
|
limit: int,
|
||
|
*,
|
||
|
query: str = None
|
||
|
) -> list[Message]:
|
||
|
"""
|
||
|
Generates a new truth, or tweet, from the author.
|
||
|
"""
|
||
|
if query is None:
|
||
|
query = "Generate a new tweet, in reply to"
|
||
|
|
||
|
@impersonate.command()
|
||
|
async def trump(self, ctx: discord.ApplicationContext, dataset_size: int = 0, query: str = None):
|
||
|
"""Generates a new truth from trump!"""
|
||
|
return await ctx.respond(":x: not done yet.")
|