Giter Site home page Giter Site logo

discordchannelcloner's Introduction

DiscordChannelCloner

A script to clone messages (along with their details) from single or multiple channels into a specified channel using Discord Webhooks. Cross-server channel cloning is supported.

Configuration

Example config.json:

[
  {
    "channel_id": 13245678913456789, // Target channel ID.
    "hook_id": 13245678913456789, // The ID of the Webhook integrated into the target channel.
    "source": [13245678913456789, 13245678913456789] // An array of channel IDs to clone messages from.
  }
]

Note that the self-host user must have the manage_webhooks permission.

Deployment

The Docker image can be found at GitHub's Container Registry:

docker pull ghcr.io/exilvm/discordchannelcloner:master

Docker Compose

It is recommended to deploy Discord Channel Cloner using Docker Compose. Check the docker-compose.yml file in this repository.

Building the Image Yourself

To build the Docker image yourself, run the following commands:

git clone [email protected]:exilvm/DiscordChannelCloner.git && cd DiscordChannelCloner

Set your TOKEN and CONFIG_DIRECTORY environment variables to the appropriate values, and run:

docker-compose up -d

Using this script for regular bots

This script uses discord.py-self. If you want to run this script on a regular bot, use discord.py instead.

discordchannelcloner's People

Contributors

dependabot[bot] avatar exil0867 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

discordchannelcloner's Issues

AttributeError: 'Member' object has no attribute 'avatar_url'

The bot was working fine and suddenly started throwing the error even though no changes had been made to the code.

2023-04-18 13:47:01 ERROR    discord.client Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/discord/client.py", line 507, in _run_event
    await coro(*args, **kwargs)
  File "//./app.py", line 47, in on_message
    await cloneMessage(message, x['channel_id'], x['hook_id'])
  File "//./app.py", line 28, in cloneMessage
    embed.set_author(name=f'{message.author.name}#{message.author.discriminator}', icon_url=message.author.avatar_url)

AttributeError: 'Member' object has no attribute 'avatar_url'

So it's a possible breaking change from discord.py-self.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.