Skip to content

A Discord bot that uses libasciic to turn images into ASCII (and then back into an image, for convenience)

License

Notifications You must be signed in to change notification settings

S0raWasTaken/ASCII-Bot

Repository files navigation

ASCII Bot

Original art by garasuno_1182

Turns any image into ASCII in a couple of clicks.

Commands:

  • /image_to_ascii <attachment> [charset]
    • example: /image_to_ascii .+p0#@ (assuming your message contains an attachment)
  • /attachment_to_ascii
    • This one is a context_menu_command, which means you can right click on a message containing an attachment (links not supported yet) and run it through the Apps context menu.
  • /avatar_to_ascii
    • Also a context_menu_command. Turns a user avatar into an ASCII image.

Usage:

If you're looking to use the bot right away, click here to add my current running version to your Discord User Apps.

Self hosting:

First of all, you're gonna need to compile your bot with a XOR'ed token file. For this, I provide the xor_token.sh script, which is pretty simple to use:

# Use your actual bot token instead, of course.
# If you are unsure about how this works, read the script, it's all bash internals :)
./xor_token.sh "MTQ.EXAMPLE.TOKEN"

Make sure the file .token.xor exists in the project's root directory now.

From now on, it's simple rust compiling:

# You can either run it directly:
cargo run --release

# Or compile it and run the binary anywhere you want:
cargo build --release
# output: ./target/release/ascii-bot or ascii-bot.exe

Please, do not share your compiled binary

The token is included with the binary, just XOR'ed in order to not show up obviously in the binary strings.
However, this is no encryption whatsoever.

This project assumes that you're not stupid. Any attacker that knows where your binary comes from will instantly know how to grab your bot token from your binary file.

License

MIT and OPEN FONT LICENSE

TL;DR (not legal advice):

  • My project is free to use, modify and redistribute
  • The font file is free to use, modify and redistribute, but don't sell it.

About

A Discord bot that uses libasciic to turn images into ASCII (and then back into an image, for convenience)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published