Skip to main content

Huggingface transformers for discord.

Project description

disformers

Huggingface transformers for discord

example

see example folder

  • use client
import discord
from DisFormers import DisFormersBot

class MyClient(discord.Client):
    async def on_ready(self):
        print("Bot is ready.")

client = MyClient()
DisFormersBot(client,prefix="!") 
#DisFormersBot(client,prefix="!",languague="en") default languague is English
# you can choose English(en) or Korean(ko) languague option

if __name__ == "__main__":
    client.run('token')
  • use commands.Bot
import discord
from discord.ext import commands
from 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")

Project details


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

disformers-0.0.2-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page