forked from neplextech/canvacord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
67 lines (63 loc) · 1.74 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Created and maintained by Snowflake Studio ❄
import Brightness from './libs/Brightness';
import Convolute from './libs/Convolute';
import Darkness from './libs/Darkness';
import Greyscale from './libs/Greyscale';
import Invert from './libs/Invert';
import Sepia from './libs/Sepia';
import Threshold from './libs/Threshold';
import Trigger from './libs/Trigger';
import Canvacord from './src/Canvacord';
import Leaver from './src/Leaver';
import Plugins from './src/Plugins';
import Rank from './src/Rank';
import Spotify from './src/Spotify';
import Util from './src/Util';
import Welcomer from './src/Welcomer';
import Assets from '@canvacord/assets';
import { version } from './package.json';
// load default fonts
try {
setTimeout(() => {
Canvacord.registerFonts();
});
} catch (e) { }
/**
* @param moduleName module name
* @param exportName the export to return
*/
function load(moduleName: string, exportName?: string) {
try {
const _module = require(moduleName);
return exportName ? _module[exportName] : _module;
} catch (e) {
return null;
}
}
export default {
Canvas: Canvacord,
ConvolutionMatrix: Canvacord.CONVOLUTION_MATRIX,
Rank,
Spotify,
Welcomer,
Leaver,
CaptchaGen: load("captcha-canvas", 'CaptchaGenerator'),
FortniteShop: load("discord-canvas", 'FortniteShop'),
FortniteStats: load("discord-canvas", 'FortniteStats'),
Plugins,
Util,
Assets,
MSX: {
Brightness,
Convolute,
Darkness,
Greyscale,
Invert,
Sepia,
Threshold,
Trigger,
},
write: Canvacord.write,
author: "Snowflake Studio ❄",
version
};