AAA3A-AAA3A / AAA3A-cogs

Many cogs for Red-DiscordBot.
https://aaa3a-cogs.readthedocs.io/en/latest
Other
34 stars 27 forks source link

[TransferChannel] Specify webhook/guild. #1

Closed CruxCraft closed 2 years ago

CruxCraft commented 2 years ago

What cog is this feature request for?

transferchannel

Describe the feature request in as much detail as possible

We are wanting to basically close a gaming guild, but from what we can tell this only allows for the cloning of channels within the same guild. If we could specify the source/destination guild or webhook, then we could do so. This would be amazing and very useful. Thanks!

AAA3A-AAA3A commented 2 years ago

@CruxCraft Hello, I have updated my TransferChannel cog. The bot owner can now specify the id of a channel from another server. Custom webhook from links are not supported. Since this cog was written when I didn't have stable Python knowledge, I modified some code to make it a bit clearer. I removed the unnecessary code and the cog now uses a method from AAA3A_utils to create the webhook. One change for the user: [p]help transferchannel. If you are happy with this, you can close this issue. Thanks for your request for new functionality!

CruxCraft commented 2 years ago

Going to test this out now! (provided I dont get distracted)

another good option might be to allow a rate-limit as well so Discord doesn't get angry - this might not be as big of a deal now though since I was using this to clone the messages and another cog to relay them

I am so thankful for adding that ability to cross servers. I will give more info after I have tested it.

CruxCraft commented 2 years ago

Converting to "_GenericAlias" failed for parameter "way".

I have tried embed way embed true true true true true false webhook

EDIT: looking at source now; way: typing.Literal["embed", "webhook", "message"]): so now I know it just looking for the word embed

am I doing something else wrong in the command?

AAA3A-AAA3A commented 2 years ago

Hello I will soon fix the problem. I don't know what it is yet. I have the same error when I test on my bot. Strangely, I think it works on the development version of Red dpy2. I tested on this one. I wanted to try on my dpy1 bot, but I got the wrong prefix. Have a nice day.

AAA3A-AAA3A commented 2 years ago

The problem is now solved. You can update the cog. In fact, one of the arguments to the single TransferChannel command was using a converter only available under dpy2, while the equivalent for dpy1 does not work under dpy2. You can see commit 3eaf8c32006430c47efbdc4937d6e076aa5c9db4 to see how the problem was fixed.

CruxCraft commented 2 years ago

There doesn't seem to be an update available yet. Last edit to it was from before you said it was fixed... I don't seem to be able to see commit 3eaf8c32006430c47efbdc4937d6e076aa5c9db4 either.

I appreciate the added feature of being able to specify the external channel - trying to copy an old gaming Discord guild, where the old captain is a mix between absent & malicious, before they start nuking all of our teams history

AAA3A-AAA3A commented 2 years ago

@CruxCraft I am sorry. I'm now using GitHub's PC client and forgot to push the commit made locally. It now shows on GitHub with the commit given earlier and with the date of 5 days ago.

CruxCraft commented 2 years ago

@CruxCraft I am sorry. I'm now using GitHub's PC client and forgot to push the commit made locally. It now shows on GitHub with the commit given earlier and with the date of 5 days ago.

It seems to be working properly now! THANK YOU!! I copied many channels that were about 200-600 messages, and now transferring one that is ~61,000 messages! I was worried that it might rate-limit, but it seems to be running slower than the older versions which is a good thing if it keeps Discord happy. A long wait but this is AMAZING! The og players will be thrilled to see their old chat messages here when it finishes. Also, it seems to be copying them in the correct order this time which it didn't in the old version.

Thank you again! Truly thrilled to be seeing this work.