sentient-jimmy/jimmy/cogs/impersonation.py
nexy7574 bcb3ddb84e
Some checks failed
Build and Publish / build_and_publish (push) Failing after 1m47s
Start working on impersonation
2024-06-10 17:44:18 +01:00

35 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.")