Coder Social home page Coder Social logo

glizzykingdreko / discordwizard Goto Github PK

View Code? Open in Web Editor NEW
28.0 1.0 20.0 16 KB

A powerful and efficient tool to clone and mirror entire Discord servers in real-time, using websockets and webhooks for seamless synchronization.

License: MIT License

Python 100.00%
ghdesktop icons8 lambdatest learn student-vscode

discordwizard's Introduction

DiscordWizard: Your Portal to Discord Server Replication ๐Ÿง™โ€โ™‚๏ธ

Welcome to the world of DiscordWizard, your trusty ally for cloning entire Discord servers. With its unique and efficient powers, DiscordWizard will help you mirror a Discord server in no time.

DiscordWizard: The Ultimate Replicator

To work with DiscordWizard, you'll need:

  • The token of a Discord account that is a member of the server you wish to copy
  • A target server where the messages will be replicated, along with the token of an account with administrative privileges
  • That's it! You're ready to go.

How DiscordWizard Works ๐ŸŽฉ

DiscordWizard operates by having the account in the source server monitor changes and new messages using a websocket. The target account then replicates these changes, creating categories, channels, and even renaming them as needed. Messages are sent through webhooks, ensuring a seamless connection between servers.

To set up DiscordWizard, configure the settings.yaml file as shown:

client:
  token: "" # Token of the account in the server to be mirrored
  server_id: 107... # Server ID
  excluded_channels:
    - 0 # List of excluded channels, if any
  regex_filter: "(badword1|badword2)" # Regex to block forwarding of messages based on it

server:
  token: "" # Administrator token within your server
  server_id: 109... # Your server ID
  interval: 60 # Delay in seconds between interactions with Discord APIs to create channels/webhooks/categories
  webhook_name: "DiscordWizard" # Webhook name to use
  websocket:
    port: 8080 # Port to use
    host: "localhost" # Host to use

Additionally, you can use the proxies.txt file to provide a list of proxies to prevent hitting Discord rate limits when mirroring large servers with high message volume. List one proxy per line in the format ip:port:user:pass or ip:port.

To start the server, run:

python3 server.py

To launch the client, execute:

python3 client.py

And just like that, the replication begins! ๐ŸŽ‰

DiscordWizard separates the client and server into two different scripts. This versatile design allows you to mirror multiple source servers (clients) to the same target server, broadening your possibilities and streamlining the process.

Note: The first time you run DiscordWizard, it will create channels, categories, and webhooks. This may take a moment due to Discord's rate limit restrictions. For larger servers, use a higher interval (40/60) to avoid hitting Discord's rate limits.

How to Contribute ๐Ÿค

We welcome and appreciate contributions from the community! If you'd like to contribute to DiscordWizard, here's how you can get involved:

  1. Fork the repository: Click the 'Fork' button at the top-right corner of the main GitHub page to create your own copy of the repository.

  2. Clone your fork: Clone your forked repository to your local machine using git clone https://github.com/YOUR-USERNAME/DiscordWizard.git.

  3. Create a branch: Before making any changes, create a new branch for your contribution using git checkout -b your-feature-branch.

  4. Make changes: Implement your feature, fix bugs, or make other improvements to the code.

  5. Commit and push: Commit your changes and push them to your forked repository using git commit -m "Your commit message" followed by git push origin your-feature-branch.

  6. Create a pull request: On the GitHub page of your forked repository, click the 'Compare & pull request' button to submit your changes for review. Provide a clear description of your changes and any additional information that may be helpful.

  7. Stay involved: Keep an eye on your pull request and be ready to respond to feedback, make changes, or answer questions. Your active participation is crucial for a smooth review process.

By following these steps, you can contribute to the development of DiscordWizard and help make it even better for everyone! We look forward to collaborating with you. ๐Ÿš€

Connect with the Developer ๐Ÿš€

Stay connected and keep up with ongoing projects and innovations.

๐Ÿ’Œ For questions or feedback, feel free to reach out via email at [email protected].

๐Ÿฆ Follow on Twitter for updates and insights at @glizzykingdreko.

๐Ÿ“š Read more about work on Medium by visiting medium.com/@glizzykingdreko.

๐Ÿ”ฎ Explore code repositories on GitHub at github.com/glizzykingdreko.

Join the journey and make your Discord server replication experience a breeze! ๐ŸŽ‰

discordwizard's People

Contributors

glizzykingdreko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

discordwizard's Issues

Error with 'discord' in name

Started server.py
Started client.py

All was working smoothly, until....

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/websockets/legacy/server.py", line 240, in handler
    await self.ws_handler(self)
  File "/opt/homebrew/lib/python3.10/site-packages/websockets/legacy/server.py", line 1186, in _ws_handler
    return await cast(
  File "/Users/tester/Desktop/DiscordWizard-main/server.py", line 148, in websocket_handler
    updated_sitemap = await update_server_structure(data["data"], sitemap_file)
  File "/Users/tester/Desktop/DiscordWizard-main/server.py", line 59, in update_server_structure
    webhook = await channel.create_webhook(name=WEBHOOK_NAME)
  File "/opt/homebrew/lib/python3.10/site-packages/discord/channel.py", line 419, in create_webhook
    data = await self._state.http.create_webhook(self.id, name=str(name), avatar=avatar)
  File "/opt/homebrew/lib/python3.10/site-packages/discord/http.py", line 302, in request
    raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In name: Username cannot contain "discord"
2023-10-11 10:26:13,705 - INFO - connection closed

Only Cloning Text Channels

Only cloned the text channels. Didn't clone the roles, so the permissions set up on the old server don't transfer over. The voice channels were also not cloned to the new server, I installed PyNaCl plugin, but still didn't do anything

Attribute Error.

Traceback (most recent call last):
File "C:\Users\stefa\Downloads\DiscordWizard-main\DiscordWizard-main\server.py", line 214, in
bot.loop.run_until_complete(start_server)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\stefa\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\client.py", line 129, in getattr
raise AttributeError(msg)
AttributeError: loop attribute cannot be accessed in non-async contexts. Consider using either an asynchronous main function and passing it to asyncio.run or using asynchronous initialisation hooks such as Client.setup_hook

Avoid channels to get copied

More than an issue is a request. Sorry not a coder so first of all thank you for the great work because it works like a charm.

Now what I see is that many times I dont really want to copy the whole structure of the discord server, but just some channels that I might be interested in. Is there a way to accomplish this with your code?

And sorry if this is not the correct place to post this. First time using github. Just created an account to post this.

Thank you in advance!

discord.py instead of discord.py-self

C:\Users-----\Downloads\DiscordWizard-main\DiscordWizard-main>python server.py
Traceback (most recent call last):
File "C:\Users-----\Downloads\DiscordWizard-main\DiscordWizard-main\server.py", line 22, in
bot = commands.Bot(command_prefix='>', self_bot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BotBase.init() missing 1 required keyword-only argument: 'intents'

Newbie question

Is this for clone discord server and copy and update all the new messages in all channels in realtime?

Do I need to keep my computer open for the clone process?

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.