Hey everyone! I’m working on a cool feature for my Discord bot. I want to make a command that lets the bot speak as if it were another user. The idea is to use something like >impersonate @username message
and have the bot send the message as if the mentioned user said it.
I’ve tried a couple of things but no luck so far. Here’s what I attempted:
async def speak_as(ctx, target, *, words):
await target.ctx.send(f'{words}')
And then I also gave this a shot:
async def speak_as(ctx, target, *, words):
await ctx.target.send(f'{words}')
Neither of these worked though. Any ideas on how to make this happen? I’m pretty new to Discord bot development so any help would be awesome. Thanks!
I get where you’re coming from with the impersonation idea, but it’s a bit of a minefield ethically. From my experience running a server, that kind of feature can quickly spiral into drama and hurt feelings, even if it’s meant in fun. Maybe consider a different angle? You could create a command that generates funny AI-based responses in the style of famous characters or personalities instead. That way you still get the fun factor without risking any user conflicts. Just food for thought based on what I’ve seen work well. Whatever direction you go, make sure to run it by your server members first to gauge their comfort level.
I understand the appeal of such a feature, but it’s important to consider the ethical implications. Impersonating other users, even in jest, can lead to misunderstandings and potential abuse. Instead, perhaps you could explore creating custom bot personas with unique voices and personalities. This would allow for fun interactions without the risks associated with mimicking real users. If you’re set on user-specific responses, consider implementing a system where users can opt-in to have the bot create custom responses based on their chat history or preferences. This approach respects user autonomy while still providing personalized interactions.
hey there! i wouldnt recommend making a command like that. it could be used to harass or impersonate ppl without their consent. maybe try something else that doesnt involve mimicking other users? just my 2 cents. good luck with ur bot tho!