├── .github
└── workflows
│ └── main.yml
├── README.md
├── anti_ping.js
├── anti_ping.md
├── emoji_packs.js
├── emoji_packs.md
├── experiments.js
└── experiments.md
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Discord Source detection
2 | on: [issues]
3 | jobs:
4 | autoclose:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - name: Autoclose Discord Source issues
8 | uses: IndyV/IssueChecker@v1.0
9 | with:
10 | repo-token: ${{ secrets.GITHUB_TOKEN }}
11 | issue-close-message: "@${issue.user.login} This issue was automatically closed because we don't accept issue reports from Discord Source.\nThe reason for this is because usually these issues aren't well thought out and are often duplicates.\n\nPlease take a few more minutes to create a well-made, proper issue report."
12 | issue-pattern: "Discord Source - .Issue Report]"
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # EnhancedDiscord-Plugins
2 | Extra plugins for [EnhancedDiscord](https://github.com/joe27g/EnhancedDiscord/).
3 |
4 | ### Plugins in this repo:
5 | - [Anti Ping](/anti_ping.md) - Hides ping icon for servers which you have muted & suppressed @everyone. [[source]](/anti_ping.js)
6 |
7 | - [Emoji Packs](/emoji_packs.md) - Allows you to replace Discord's emojis with a new set. [[source]](/emoji_packs.js)
8 |
9 | - [Experiments](/experiments.md) - Enables experimental features not yet released to standard Discord clients. [[source]](/experiments.js)
10 |
--------------------------------------------------------------------------------
/anti_ping.js:
--------------------------------------------------------------------------------
1 | const Plugin = require('../plugin');
2 |
3 | module.exports = new Plugin({
4 | name: 'Anti-Ping',
5 | author: 'Joe 🎸#7070',
6 | description: 'Removes ping box for any server that is muted and has @everyone surpressed.',
7 | color: 'aqua',
8 |
9 | load: async function() {
10 |
11 | while (!findModule('getMentionCount', true) || !findModule('isMuted', true) || !findModule('getChannels', true))
12 | await this.sleep(1000);
13 |
14 | let m = findModule('isMuted');
15 | let c = findModule('getChannels');
16 |
17 | monkeyPatch(findModule('getMentionCount'), 'getMentionCount', function () {
18 | let ch = c.getChannels()[arguments[0].methodArguments[0]];
19 | if (ch && ch.guild_id && m.isMuted(ch.guild_id) && m.isSuppressEveryoneEnabled(ch.guild_id)) {
20 | return 0;
21 | }
22 | return arguments[0].callOriginalMethod(arguments[0].methodArguments);
23 | });
24 | },
25 | unload: function() {
26 | this.log(findModule('getMentionCount').getMentionCount.unpatch);
27 | }
28 | });
29 |
--------------------------------------------------------------------------------
/anti_ping.md:
--------------------------------------------------------------------------------
1 | # Anti Ping
2 | Hides ping icon for servers which you have muted & suppressed @everyone.
3 |
4 | #### To hide all pings for a server:
5 | 1. Right-click the server and make sure the "Server Mute" checkbox is checked.
6 | 2. Right-click the server and go to "Notification Settings" and make sure the "Suppress @everyone and @here" toggle is turned on.
7 | 3. Done! You may need to reload your client (Ctrl+R) to see changes for all servers.
8 |
9 | #### Download
10 | To quickly download, right-click [this link](https://github.com/joe27g/EnhancedDiscord-Plugins/raw/master/anti_ping.js) and `Save link as...`
11 |
--------------------------------------------------------------------------------
/emoji_packs.js:
--------------------------------------------------------------------------------
1 | const Plugin = require('../plugin');
2 |
3 | module.exports = new Plugin({
4 | name: 'Emoji Packs',
5 | author: 'Joe 🎸#7070',
6 | description: "Replaces Discord's default emojis with different ones of your choice.",
7 | color: 'maroon',
8 |
9 | config: {
10 | pack: {
11 | default: 'none',
12 | allowed: {
13 | none: 'Default | Default emojis used by Discord (and Twitter.)',
14 | blobs: 'Blobs | Google Blob Emoji (Android Lollipop and earlier.) Preview',
15 | emojione: 'EmojiOne | A simple emoji pack built for use by apps and web services. Preview',
16 | windows: 'Windows | Emoji pack used by Windows and other Microsoft products. Preview',
17 | samsung: 'Samsung | Emojis used in Samsung phones and devices. Preview',
18 | apple: 'Apple | Emojis used on iPhones, macOS, etc. [NOTE: incomplete ~ many emojis won\'t work] Preview',
19 | google: 'Google | Google Emoji (Android Oreo and later.) Preview',
20 | facebook: 'Facebook | Emoji used on Facebook. Preview',
21 | fbmessenger: 'Facebook Messenger | Emoji used in the older versions of Facebook Messenger. Preview'
22 | }
23 | }
24 | },
25 |
26 | load: async function() {
27 |
28 | while (!findModule('getURL', true) || !findModule('convert', true))
29 | await this.sleep(1000);
30 |
31 | let formats = {
32 | 'blobs': 'https://raw.githubusercontent.com/googlei18n/noto-emoji/563fa14298e103d54b81b370668f1c92370273da/png/128/emoji_u{code_}.png',
33 | 'emojione': 'https://www.emojiok.com/resolution/static/img/emoji/std/one/{code}.png',
34 | 'windows': 'https://www.emojiok.com/resolution/static/img/emoji/wind/20170529/{code}.png',
35 | 'samsung': 'https://www.emojiok.com/resolution/static/img/emoji/sams/20170529/{code}.png',
36 | 'apple': 'https://www.emojiok.com/resolution/static/img/emoji/appl/20170514/u{codE}.png', // UNRELIABLE
37 | 'google': 'https://github.com/googlei18n/noto-emoji/blob/master/png/128/emoji_u{code_}.png?raw=true', // after redesign
38 | 'facebook': 'https://www.emojiok.com/resolution/static/img/emoji/std/fb/{code}.png',
39 | 'fbmessenger': 'https://www.emojiok.com/resolution/static/img/emoji/std/fbm/{code}.png',
40 | };
41 |
42 | window.emojiMode = 'blobs';
43 |
44 | const c = findModule('convert').convert;
45 |
46 | let thiss = this;
47 |
48 | monkeyPatch( findModule('getURL'), 'getURL', function() {
49 | if (!thiss.settings.pack || !formats[thiss.settings.pack])
50 | return arguments[0].callOriginalMethod(arguments[0].methodArguments);
51 |
52 | return formats[thiss.settings.pack]
53 | .replace('{code}', c.toCodePoint(arguments[0].methodArguments[0]))
54 | .replace('{codE}', c.toCodePoint(arguments[0].methodArguments[0]).toUpperCase())
55 | .replace('{code_}', c.toCodePoint(arguments[0].methodArguments[0]).replace(/-/g, '_'))
56 | })
57 | },
58 | unload: function() {
59 | findModule('getURL').getURL.unpatch();
60 | },
61 | generateSettings: function() {
62 | const a = window.ED.classMaps.alignment;
63 | const d = window.ED.classMaps.description;
64 | const h = window.ED.classMaps.headers;
65 | const l = window.ED.classMaps.labels = findModule('labelText');
66 | const cbw = window.ED.classMaps.cbWrapper = findModule('checkboxWrapper');
67 | const fc = findModule('flexChild');
68 |
69 | let current = this.settings.pack, stuff = this.config.pack.allowed;
70 | let result = `