discord-ch-merge

command module
v0.0.0-...-319cc16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

README

Discord Channel Merger Bot

This Go package provides a Discord bot that reads messages from specified Discord channels, stores them in order of when the messages were delivered in PebbleDB, and then sends them to a specified Discord channel. It includes functionality to handle message content, message pins and attachments, and ensures proper error handling and resource cleanup.

Features

  • Reads messages from specified Discord channels.
  • Stores messages in order PebbleDB.
  • Sends stored messages to a specified Discord channel.
  • Handles message content and attachments.
  • Ensures proper error handling and resource cleanup.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/discord-ch-merge.git
    cd discord-ch-merge
    
  2. Build:

     go build -o discord-ch-merge .
    

Configuration

The bot requires the following configuration parameters:

  • FROM: A list of source channel IDs to read messages from.
  • TO: The destination channel ID to send messages to.
  • TOKEN: The Discord bot token.

You can set these parameters using environment variables or command-line flags.

Usage

Run the bot with the required configuration:

./discord-ch-merge  --from <source_channel_id> --to <destination_channel_id> --token <bot_token>

Example:

./discord-ch-merge --from 123456789012345678 --to 987654321098765432 --token YOUR_BOT_TOKEN

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Acknowledgements

  • discordgo - Discord API wrapper for Go.
  • Pebble - Key-value store library for Go.
  • zap - Fast, structured, leveled logging in Go.

Documentation

Overview

Package main provides a Discord bot that reads msgs from discord channels and stores them in PebbleDB which are then sent to a specified Discord channel. It includes functionality to handle message content and attachments, and ensures proper error handling and resource cleanup.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL