https://github.com/jakecorrenti/guild
Command Line Utility that posts code snippets from a file to a Discord channel
https://github.com/jakecorrenti/guild
cli discord discord-bot guild rust rust-lang webhooks
Last synced: about 2 months ago
JSON representation
Command Line Utility that posts code snippets from a file to a Discord channel
- Host: GitHub
- URL: https://github.com/jakecorrenti/guild
- Owner: jakecorrenti
- License: mit
- Created: 2020-12-28T20:52:27.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-02T16:10:30.000Z (over 5 years ago)
- Last Synced: 2025-04-29T09:51:58.327Z (about 1 year ago)
- Topics: cli, discord, discord-bot, guild, rust, rust-lang, webhooks
- Language: Rust
- Homepage: https://jakecorrenti.github.io/guild/
- Size: 320 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# guild
Guild is a Command Line Utility that allows you to post code snippets from a file to a Discord channel.
# How does it work?
By utilizing [Serentiy](https://www.github.com/serenity-rs/serenity) to access the Discord API, guild communicates with your Discord server using Webhooks. This allows guild to post a message to Discord on its own without having to type anything into Discord itself.
# Download
## Install Rust
In order to download guild, you need to have Rust downloaded on your computer if you don't already. To install Rust, go to the [Rust website](https://www.rust-lang.org/tools/install) and follow the instructions.
## Install guild
Once Rust is installed on your machine, you must install guild through Cargo:
```bash
cargo install guild
```
# Usage
1. Create a [Discord Webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) in the desired server
2. Copy the Discord Webhook URL and execute the following command in your terminal
```bash
guild set
```
3. Post your desired code snippet to the Discord server:
```bash
guild post
```
- If you would like the code snippet to have syntax highlighting, add the following flag at the end of your command:
```bash
guild post -H
```
or
```bash
guild post --highlight
```
- Example:
```bash
guild post main.c 1 5 -H
```
## Commands
- `set`: Set the Discord Webhook URL
- `post`: Post a code snippet to the set Discord channel
## Flags
- `help`: See the possible commands and flags that are supported by guild
- `highlight`: Enable syntax highlighting for the code snippet