Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pixieditor/pixibot

A Discord Bot for parsing .pixi files and upscale them to a higher resolution
https://github.com/pixieditor/pixibot

bot csharp discord discord-bot discordapp dotpixi net6 pixel-art pixelart pixi

Last synced: about 3 hours ago
JSON representation

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

Awesome Lists containing this project

README

        

---

**PixiBot** is a [Discord](https://discord.com) 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.

# :question: About PixiBot

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

It uses [Discord.Net](https://github.com/discord-net/Discord.Net) to connect to the Discord API, [PixiParser](https://github.com/PixiEditor/PixiParser) to parse .pixi files and [SkiaSharp](https://github.com/mono/SkiaSharp) for rendering the files to a upscaled version png version

# :arrow_right: Invite

Currently, we host PixiBot only for our [own server](https://discord.gg/qSRMYmq).

You can however host the bot yourself in any environment that can run a .NET 6 Console Applications and supports the [SkiaSharp](https://github.com/mono/SkiaSharp) library.

# :gear: Current Features

* Parse .pixi files and upscale them

# :soon: Planned Features

* Commands for working with images

* Support for more common file types

# :runner: Self-Hosting

We provide [binaries](https://github.com/PixiEditor/PixiBot/releases/latest) for Windows and Linux

The bot runs perfectly fine on a Raspberry Pi 4

## :fast_forward: Getting started

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

### :heavy_plus_sign: 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](https://discord.com/developers/applications) 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

### :cd: Download and install the bot client

Just download the correct binary from the [releases](https://github.com/PixiEditor/PixiBot/releases/latest) 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.

### :wrench: 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!)

```json
{
"Bot": {
"BotToken": ""
},
"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](https://github.com/PixiEditor/PixiBot/wiki/Configuration)

### :arrow_forward: 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](https://github.com/PixiEditor/PixiBot/wiki/Systemd)