Imitate everyone individually.
Parrot is a polymorphic Markov Chain generator for Discord that trains a unique
model for each user. With a single bot, you can imitate a theoretically
unlimited number of users. Once a user is registered, Parrot automatically
learns how to speak like them through the messages they send. You can have
Parrot imitate any registered user with the |imitate command.
Parrot uses Webhooks to take on the name and avatar of the person it's
currently imitating. If you'd rather Parrot speak in a given channel without a
Webhook, just take away its manage_webhooks permission there, and it will
talk through an embed instead of a Webhook.
Parrot has to collect users' messages to work, so to ensure that no one's
messages are collected without their consent, each user who wants Parrot to be
able to imitate them must first register with Parrot through the |register
command. After that though, it's simple to get started.
For now, if you want Parrot on your server, you'll have to run it yourself.
- Create a Discord bot in the Discord Developer Portal.
- Create an invite link with these permissions and invite the bot to your server.
- Clone this repo.
- Run
poetry installin the project's directory. - Copy
config.example.pytoconfig.pyand follow the config documentation to fill in the needed information. - Change
privacy-policy.mdto fit your situation. $ python -m parrot.main.
Parrot needs the following Bot Permissions:
Required
- Send Messages
- Read Message History (required for Quickstart) Parrot also needs Message Content intent. Y'know. To learn from messages.
Optional
- Manage Webhooks - This permission lets Parrot use webhooks to mimick users' name and avatar. If not granted, Parrot will use a less-pretty embed instead.
Parrot needs a little information from you for it to start working.
Required
DISCORD_BOT_TOKEN- The bot token generated for your copy of Parrot on the Discord Developer Portal.ADMIN_USER_IDSand/orADMIN_ROLE_IDS- An array of IDs of the users or roles you want to give admin privileges to. Admins get access to commands for managing Parrot. For example,[54757394934834985, 23947297429259834, 29797299597494445].
Optional
CHAIN_CACHE_SIZE- How many Markov models to keep in memory at a time. Increasing this number will make Parrot take up (even) more RAM, while decreasing it will Parrot slower at imitating while increasing disk reads and CPU usage. Default is5.COMMAND_PREFIX- The character(s) that go before a Parrot command. Default is"|".DB_PATH- Path to a sqlite3 database file to keep Parrot's data. If it doesn't exist, it will be created.AUTOSAVE_INTERVAL_SECONDS- How often to commit the database to disc. Parrot also saves before shutting down. Default is one hour—3600.AYY_LMAO- (((extremely important feature))) Set toTrueto make Parrot say "lmao" every time someone else says "ayy". Default isFalse.
Outside of libraries, some code in here was lifted from other sources on the
internet. Anywhere this is the case, credit is given.
Code copied from:
crimsobot/crimsoBOT
© 2019 crimso, williammck - MIT
@redgoldlace