elightcap / blackmail

0 stars 0 forks source link

!rename channel-name #23

Closed effinowen closed 3 years ago

effinowen commented 3 years ago

I'm guessing because I deleted and remade a channel on here that the database has a record of my old channels name and so it's locked to that channel name and I cannot privatize my new one, if there was a way to force an update of what the channel name is supposed to be in the database, could probably do something like !updatename #new-name-here -> checks database for existing name and if it exists errors out, otherwise proceeds to takes user who requested it, finds their name in the database and selects that table line, uses that name as the old name -> new name variable for setting a channel name in the discord, or something similar to this?

I'm hoping something like this would allow a channel to be renamed while keeping all other command functionality intact, could use similar whitelisting that the nuke currently uses to check for eligable channel names maybe? Or only make it rename the channel that the command was originally run in? This wouldn't even need to be checked by the owner, would just have to check it against that channels user group, so anyone in that group could rename a private chanel, including hackers which could be a fun little fuck you, hack into someones channel and rename it to "bunch-of-losers" or something

elightcap commented 3 years ago

Channel IDs are stored in database. Deleting channels isn’t in scope, as users won’t have permissions to delete their channels.

the problem here is the database stores entries using your discord user ID as primary key, which makes for faster lookups. However it also means you can’t have more than one channel in your name, which again is expected. I’ll have to manually drop your channel from the database.

effinowen commented 3 years ago

Kk cool, if channel unique ID's are what it stores then that means it doesnt matter what the channel name is in relation to the commands i take it, what I'll do then is force channel renames to only happen when I'm around right now as I need to update the hacking channel with the new name anyways,