Huggingface transformers for discord.
Project description
disformers
- Huggingface transformers for discord
- base source butyr/huggingface-transformer-chatbots
install
pip install -U disformers
example
-
see example folder
-
use client
import discord
from disformers.DisFormers import DisFormersBot
client = discord.Client()
disformerbot = DisFormersBot(client, prefix="!")
@client.event
async def on_ready():
print("Bot is ready.")
@client.event
async def on_message(message):
await disformerbot.client_message(message=message)
if __name__ == "__main__":
client.run('token')
- use commands.Bot
import discord
from discord.ext import commands
from disformers.DisFormers import DisFormersBot
class MyBot(commands.Bot):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
async def on_ready(self):
print("Bot is ready.")
my_bot = MyBot(command_prefix="!", intents=discord.Intents.all())
DisFormersBot(my_bot,prefix="!")
#DisFormersBot(client,prefix="!",languague="en") default languague is English
# you can choose English(en) or Korean(ko) languague option
if __name__ == "__main__":
my_bot.run("token")
contact
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for disformers-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d78e7d2122ee5253cc9f6bbe0aaf458d06804ca1f689c8db9c7590f85c4b8c0a |
|
MD5 | 40eabaa62d7c854a811e8bcfcae03480 |
|
BLAKE2b-256 | 061be0fb1678e3025b919771eca9b1f6812547cd9c2c8e7df265dcfca3f82a35 |