Skip to main content

Huggingface transformers for discord.

Project description

disformers

Huggingface transformers for discord

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


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

If you're not sure about the file name format, learn more about wheel file names.

disformers-0.0.5-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file disformers-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: disformers-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for disformers-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0775b5a57f80adba37d105903014d11ce64b9cc9aadd5d4f71bb0307c9129af1
MD5 c4bc4a780364f2fe8caf6c24181c7cef
BLAKE2b-256 edc17a8089121bc5eba3be45f790780d0a3f1dfe4926000a4096317b81465e05

See more details on using hashes here.

Supported by

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