Hold on the name → Copy the link
Go to the plugins page in settings → press +
Dependency:
eval
in work
My vencordetta plugins
License: The Unlicense
let delet = {};
// type Object {}
{
"<EventID>" : {
"arg": "<MessageDataArguments[Array]>",
"flag": "< 1 | 2 >" // 1 = Cached and modified, 2 = Good for deletion
}
}
let message = "This message was deleted";
delet
with several datas in it and modify the message to RED Error message that dismissable.if( !delet[event.id] ) {
args[0] = {
type: "MESSAGE_EDIT_FAILED_AUTOMOD",
messageData: {
type: 1,
message: {
channelId: event.channelId,
messageId: event.id,
},
},
errorResponseBody: {
code: 200000,
message,
},
};
delet[event.id] = {
arg: args,
flag: 1
};
return args;
}
delet
and then if the flag of said id is 1
, if both statement is true
then we update the flag to 2
, then we replace the msg with arg
that contains the modified version to avoid it deleting the msg by accident, basically forcing it to not deleting it by updating it with the same stuff, this works for no reasonif( delet[event.id] && delet[event.id]['flag'] == 1 ) {
delet[event.id]['flag'] = 2;
return delet[event.id]["arg"];
};
delet
, and if the flag is 2
, if statements are true, then we just delete the key from delet
and remove the message.if( delet[event.id] && delet[event.id]['flag'] == 2 ) {
delete delet[event.id], delet;
return args;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.