Fusion.py

Documentation

What is Fusion.py you might ask; Fusion.py is a Discord.py fork that
has most of the good features from most of the big Discord.py forks, and
provides a library that has features that other forks has and combines
most of the big forks with some added features.

Badges

Discord
PyPi

Python Version

Issues
Forks
Stars
License

Main Features

  • Modern Python API async wrapper.
  • Rate limit handling.
  • Optimised for Speed and Memory.
  • Big features combined into one from other forks.

Installation

Python 3.8 or higher is required

Normal Installation:

  # Windows
$ py -3 -m pip install -U fusion.py
  # Linux/MacOS
$ python3 -m pip install -U fusion.py

Installation with Full Voice Support:

  # Windows
$ py -3 -m pip install -U fusion.py[voice]
  # Linux/MacOS
$ python3 -m pip install -U fusion.py[voice]

Installing Development Builds:

$ git clone https://github.com/Senarc-Studios/fusion.py
$ cd fusion.py
$ python3 -m pip install -U .[voice]

Additional Packages

Please note that on Linux installing voice you must install the
following packages via your package manager (e.g. “apt“) before
running the commands above:

  • libffi-dev (or libffi-devel on some systems)
  • python-dev (e.g. python3.6-dev for Python 3.6)

Examples

Client:

import discord

class MyClient(discord.Client):
    async def on_ready(self):
        print('Logged on as', self.user)

    async def on_message(self, message):
        # To make sure that the bot doesn't respond to it's own messages.
        if message.author == self.user:
            return

        if message.content == 'ping':
            await message.channel.send('pong')

client = MyClient()
client.run('your-token')

Bot:

import discord
from discord.ext import commands

bot = commands.Bot(command_prefix="!", slash_interactions=True)

@bot.command(slash_interaction=True)
async def ping(ctx):
    await ctx.send("pong", ephemeral=True)

bot.run("your-token")

Links

Fusion Outsourced Credits

Fusion.py wouldn’t be made possible without these projects andcontributors.

  1. Enhanced Discord.py
  2. Pycord

GitHub

View Github