It shows deleted messages, Simple as that!
Show deleted messages plugin by kodingcangaroo
Details
Authorkodingcangaroo
LicenseNo License
CategoryDiscord.com
Created
Updated
Size235 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
I didn't originally make this, I just copied the code and transfered it to stylus so you can use it online without betterdiscord and the discord app.
Source code
Source code has over 10K characters, so we truncated it. You can inspect the full source code on install link./* ==UserStyle==
@name Show deleted messages plugin
@version 20220501.02.27
@namespace userstyles.world/user/kodingcangaroo
@description It shows deleted messages, Simple as that!
@author kodingcangaroo
@license No License
==/UserStyle== */
@-moz-document domain("discord.com") {
//META{"name":"MessageLoggerV2","source":"https://github.com/1Lighty/BetterDiscordPlugins/blob/master/Plugins/MessageLoggerV2/MessageLoggerV2.plugin.js","website":"https://1lighty.github.io/BetterDiscordStuff/?plugin=MessageLoggerV2","authorId":"239513071272329217","invite":"NYvWdN5","donate":"https://paypal.me/lighty13"}*//
/*@cc_on
@if (@_jscript)
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject('WScript.Shell');
var fs = new ActiveXObject('Scripting.FileSystemObject');
var pathPlugins = shell.ExpandEnvironmentStrings('%APPDATA%\\BetterDiscord\\plugins');
var pathSelf = WScript.ScriptFullName;
// Put the user at ease by addressing them in the first person
shell.Popup('It looks like you\'ve mistakenly tried to run me directly. \n(Don\'t do that!)', 0, 'I\'m a plugin for BetterDiscord', 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
shell.Popup('I\'m in the correct folder already.\nJust go to settings, plugins and enable me.', 0, 'I\'m already installed', 0x40);
} else if (!fs.FolderExists(pathPlugins)) {
shell.Popup('I can\'t find the BetterDiscord plugins folder.\nAre you sure it\'s even installed?', 0, 'Can\'t install myself', 0x10);
} else if (shell.Popup('Should I copy myself to BetterDiscord\'s plugins folder for you?', 0, 'Do you need some help?', 0x34) === 6) {
fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
// Show the user where to put plugins in the future
shell.Exec('explorer ' + pathPlugins);
shell.Popup('I\'m installed!\nJust go to settings, plugins and enable me!', 0, 'Successfully installed', 0x40);
}
WScript.Quit();
@else @*/
// extra TODOs:
// special edited message https://i.clouds.tf/guli/mric.png
// modal for checking which servers/channels/users are blacklisted/whitelisted
// option to show all hidden
if (!globalThis.jQuery) globalThis.jQuery = class JQuery { }; // zere bad lol
module.exports = class MessageLoggerV2 {
getName() {
return 'MessageLoggerV2';
}
getVersion() {
return '1.7.55';
}
getAuthor() {
return 'Lighty';
}
getDescription() {
return 'Saves all deleted and purged messages, as well as all edit history and ghost pings. With highly configurable ignore options, and even restoring deleted messages after restarting Discord.';
}
load() { }
start() {
let onLoaded = () => {
try {
if (!global.ZeresPluginLibrary || !(this.localUser = ZeresPluginLibrary.DiscordModules.UserStore.getCurrentUser())) setTimeout(onLoaded, 1000);
else this.initialize();
} catch (err) {
ZeresPluginLibrary.Logger.stacktrace(this.getName(), 'Failed to start!', err);
ZeresPluginLibrary.Logger.err(this.getName(), `If you cannot solve this yourself, contact ${this.getAuthor()} and provide the errors shown here.`);
this.stop();
XenoLib.Notifications.error(`[**${this.getName()}**] Failed to start! Try to CTRL + R, or update the plugin, like so\n![image](https://i.imgur.com/tsv6aW8.png)`, { timeout: 0 });
}
};
this.pluginDir = (BdApi.Plugins && BdApi.Plugins.folder) || window.ContentManager.pluginsFolder;
this.__isPowerCord = !!window.powercord && typeof BdApi.__getPluginConfigPath === 'function' || typeof global.isTab !== 'undefined';
let XenoLibOutdated = false;
let ZeresPluginLibraryOutdated = false;
if (global.BdApi && BdApi.Plugins && typeof BdApi.Plugins.get === 'function' /* you never know with those retarded client mods */) {
const versionChecker = (a, b) => ((a = a.split('.').map(a => parseInt(a))), (b = b.split('.').map(a => parseInt(a))), !!(b[0] > a[0])) || !!(b[0] == a[0] && b[1] > a[1]) || !!(b[0] == a[0] && b[1] == a[1] && b[2] > a[2]);
const isOutOfDate = (lib, minVersion) => lib && lib._config && lib._config.info && lib._config.info.version && versionChecker(lib._config.info.version, minVersion) || typeof global.isTab !== 'undefined';
const iXenoLib = BdApi.Plugins.get('XenoLib');
const iZeresPluginLibrary = BdApi.Plugins.get('ZeresPluginLibrary');
if (isOutOfDate(iXenoLib, '1.3.35')) XenoLibOutdated = true;
if (isOutOfDate(iZeresPluginLibrary, '1.2.28')) ZeresPluginLibraryOutdated = true;
}
if (!global.XenoLib || !global.ZeresPluginLibrary || global.DiscordJS || XenoLibOutdated || ZeresPluginLibraryOutdated) {
this._XL_PLUGIN = true;
if ("undefined" != typeof global.isTab) return;
const a = !!window.powercord && "function" == typeof BdApi.__getPluginConfigPath,
b = BdApi.findModuleByProps("openModal", "hasModalOpen");
if (b && b.hasModalOpen(`${this.name}_DEP_MODAL`)) return;
const c = !global.XenoLib,
d = !global.ZeresPluginLibrary,
e = c && d || (c || d) && (XenoLibOutdated || ZeresPluginLibraryOutdated),
f = (() => {
let a = "";
return c || d ? a += `Missing${XenoLibOutdated || ZeresPluginLibraryOutdated ? " and outdated" : ""} ` : (XenoLibOutdated || ZeresPluginLibraryOutdated) && (a += `Outdated `), a += `${e ? "Libraries" : "Library"} `, a
})(),
g = (() => {
let a = `The ${e ? "libraries" : "library"} `;
return c || XenoLibOutdated ? (a += "XenoLib ", (d || ZeresPluginLibraryOutdated) && (a += "and ZeresPluginLibrary ")) : (d || ZeresPluginLibraryOutdated) && (a += "ZeresPluginLibrary "), a += `required for ${this.name} ${e ? "are" : "is"} ${c || d ? "missing" : ""}${XenoLibOutdated || ZeresPluginLibraryOutdated ? c || d ? " and/or outdated" : "outdated" : ""}.`, a
})(),
h = BdApi.findModuleByDisplayName("Text"),
i = BdApi.findModuleByDisplayName("ConfirmModal"),
j = () => BdApi.alert(f, BdApi.React.createElement("span", {
style: {
color: "white"
}
}, BdApi.React.createElement("div", {}, g), `Due to a slight mishap however, you'll have to download the libraries yourself. This is not intentional, something went wrong, errors are in console.`, d || ZeresPluginLibraryOutdated ? BdApi.React.createElement("div", {}, BdApi.React.createElement("a", {
href: "https://betterdiscord.net/ghdl?id=2252",
target: "_blank"
}, "Click here to download ZeresPluginLibrary")) : null, c || XenoLibOutdated ? BdApi.React.createElement("div", {}, BdApi.React.createElement("a", {
href: "https://betterdiscord.net/ghdl?id=3169",
target: "_blank"
}, "Click here to download XenoLib")) : null));
if (global.XenoLib && global.ohgodohfuck) return;
if (!b || !i || !h) return console.error(`Missing components:${(b ? "" : " ModalStack") + (i ? "" : " ConfirmationModalComponent") + (h ? "" : "TextElement")}`), j();
class k extends BdApi.React.PureComponent {
constructor(a) {
super(a), this.state = {
hasError: !1
}, this.componentDidCatch = a => (console.error(`Error in ${this.props.label}, screenshot or copy paste the error above to Lighty for help.`), this.setState({
hasError: !0
}), "function" == typeof this.props.onError && this.props.onError(a)), this.render = () => this.state.hasError ? null : this.props.children
}
}
let l = !!global.DiscordJS,
m = !1;
const n = b.openModal(c => {
if (m) return null;
try {
return BdApi.React.createElement(k, {
label: "missing dependency modal",
onError: () => (b.closeModal(n), j())
}, BdApi.React.createElement(i, Object.assign({
header: f,
children: BdApi.React.createElement(h, {
size: h.Sizes.SIZE_16,
children: [`${g} Please click Download Now to download ${e ? "them" : "it"}.`]
}),
red: !1,
confirmText: "Download Now",
cancelText: "Cancel",
onCancel: c.onClose,
onConfirm: () => {
if (l) return;
l = !0;
const c = require("request"),
d = require("fs"),
e = require("path"),
f = BdApi.Plugins && BdApi.Plugins.folder ? BdApi.Plugins.folder : window.ContentManager.pluginsFolder,
g = () => global.XenoLib && !XenoLibOutdated ? (BdApi.isSettingEnabled("fork-ps-5") || BdApi.isSettingEnabled("autoReload")) && !a ? void 0 : void BdApi.showToast("Reload to load the libraries and plugin!") : void c("https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/1XenoLib.plugin.js", (c, g, h) => {
try {
if (c || 200 !== g.statusCode) return b.closeModal(n), j();
d.writeFile(e.join(f, "1XenoLib.plugin.js"), h, () => {
(BdApi.isSettingEnabled("fork-ps-5") || BdApi.isSettingEnabled("autoReload")) && !a || BdApi.showToast("Reload to load the libraries and plugin!")
})
} catch (a) {
console.error("Fatal error downloading XenoLib", a), b.closeModal(n), j()
}
});
!global.ZeresPluginLibrary || ZeresPluginLibraryOutdated ? c("https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js", (a, c, h) => {
try {
if (a || 200 !== c.statusCode) return b.closeModal(n), j();
d.writeFile(e.join(f, "0PluginLibrary.plugin.js"), h, () => { }), g()
} catch (a) {
console.error("Fatal error downloading ZeresPluginLibrary...