Skip to content

A Discord Bot for parsing .pixi files and upscale them to a higher resolution

License

Notifications You must be signed in to change notification settings

PixiEditor/PixiBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation


PixiBot is a Discord Bot who's able to parse .pixi files and encode them to a high res png image.

All you have to do is send a .pixi file in any channel and PixiBot will automatically respond with the upscaled png version.

❓ About PixiBot

PixiBot is a .NET 7 console application written in C#

It uses Discord.Net to connect to the Discord API, PixiParser to parse .pixi files and SkiaSharp for rendering the files to a upscaled version png version

➡️ Invite

Currently, we host PixiBot only for our own server.

You can however host the bot yourself in any environment that can run a .NET 6 Console Applications and supports the SkiaSharp library.

⚙️ Current Features

  • Parse .pixi files and upscale them

🔜 Planned Features

  • Commands for working with images

  • Support for more common file types

🏃 Self-Hosting

We provide binaries for Windows and Linux

The bot runs perfectly fine on a Raspberry Pi 4

⏩ Getting started

NOTE: The bot will only be able to respond while the client is running.

➕ Create a bot account

You will need a Discord bot account if you want to connect to Discord. If you already have one you can skip this step.

  1. Just head over to the Discord Developer Portal and log in if you aren't already

  2. Click on the "New Application" button and give your new application a name, you can just use your Bot's name

💿 Download and install the bot client

Just download the correct binary from the releases for the machine you will use or you can build it yourself.

After the download is complete you will need to extract the ZIP to be able to use the client.

🔧 Configure the Bot

You will need to tell the bot how it can log into Discord

  1. Go to the Bot tab in the Discord Developer Portal and enable Message Content Intent

  2. Click the "Reset Token" button and hit Copy to copy the token to your clipboard.

    NOTE: Only share this token with someone you trust! Anyone with that token has full control over your bot.

  3. Create a file called appsettings.json and open it in your favorite text editor

  4. Put in the following JSON data and replace the with your actual bot token (Do not remove any quotation marks!)

{
    "Bot": {
        "BotToken": "<bot-token>"
    },
    "Discord": {
        "GatewayIntents": "GuildMessages, DirectMessages, Guilds, MessageContent"
    }
}

The GatewayIntents tell Discord what the Bot want's to be notified about, if you don't want your Bot to respond to direct messages you can just remove the DirectMessage from the intents

You find additional configuration options, like adding a loading emoji or specifying in which channel the Bot works here

▶️ Run the bot

This step depends on your OS

Windows

Just run the PixiBot.exe

Linux

Just run the PixiBot executable file

If you can't run, you might have to mark the file as executable by opening a terminal in the bots directory and running sudo chmod +x ./PixiBot

You can also follow this tutorial to set up PixiBot with systemd to make managing easier here