xernerx 2.6.8 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,155 +1,155 @@
1
1
  body {
2
- font-family: "Cascadia Code";
3
- color: white;
4
- background: #424549;
5
- margin: 0;
2
+ font-family: "Cascadia Code";
3
+ color: white;
4
+ background: #424549;
5
+ margin: 0;
6
6
  }
7
7
 
8
8
  .top-bar {
9
- background-color: rgba(0, 0, 0, 0.4);
10
- display: flex;
11
- align-items: baseline;
12
- border: 2px solid red;
13
- border-radius: 0.5rem;
14
- gap: 1rem;
15
- padding: 0.5rem;
16
- margin: 10;
17
- position: sticky;
9
+ background-color: rgba(0, 0, 0, 0.4);
10
+ display: flex;
11
+ align-items: baseline;
12
+ border: 2px solid red;
13
+ border-radius: 0.5rem;
14
+ gap: 1rem;
15
+ padding: 0.5rem;
16
+ margin: 10;
17
+ position: sticky;
18
18
  }
19
19
 
20
20
  .link {
21
- background: none;
22
- border: none;
23
- text-decoration: none;
24
- color: white;
25
- cursor: pointer;
26
- font-family: inherit;
27
- font-size: inherit;
28
- cursor: pointer;
29
- padding: 0;
21
+ background: none;
22
+ border: none;
23
+ text-decoration: none;
24
+ color: white;
25
+ cursor: pointer;
26
+ font-family: inherit;
27
+ font-size: inherit;
28
+ cursor: pointer;
29
+ padding: 0;
30
30
  }
31
31
 
32
32
  .dropdown.active > .link,
33
33
  .link:hover {
34
- color: black;
35
- background: red;
36
- border-radius: 0.5rem;
34
+ color: black;
35
+ background: red;
36
+ border-radius: 0.5rem;
37
37
  }
38
38
 
39
39
  .dropdown {
40
- position: relative;
40
+ position: relative;
41
41
  }
42
42
 
43
43
  .dropdown-menu {
44
- position: absolute;
45
- left: 0;
46
- top: calc(100% + 0.25rem);
47
- background-color: rgba(0, 0, 0, 0.4);
48
- padding: 0.75rem;
49
- border-radius: 0.5rem;
50
- box-shadow: 0 2px 5px, 0 rgba(0, 0, 0, 0.1);
51
- opacity: 0;
52
- pointer-events: none;
53
- transform: translateY(-10px);
54
- transition: opacity 150ms ease-in-out, transform 150ms ease-in-out;
44
+ position: absolute;
45
+ left: 0;
46
+ top: calc(100% + 0.25rem);
47
+ background-color: rgba(0, 0, 0, 0.4);
48
+ padding: 0.75rem;
49
+ border-radius: 0.5rem;
50
+ box-shadow: 0 2px 5px, 0 rgba(0, 0, 0, 0.1);
51
+ opacity: 0;
52
+ pointer-events: none;
53
+ transform: translateY(-10px);
54
+ transition: opacity 150ms ease-in-out, transform 150ms ease-in-out;
55
55
  }
56
56
 
57
57
  .dropdown.active > .link + .dropdown-menu {
58
- opacity: 1;
59
- transform: translateY(0);
60
- pointer-events: auto;
58
+ opacity: 1;
59
+ transform: translateY(0);
60
+ pointer-events: auto;
61
61
  }
62
62
 
63
63
  .side-bar {
64
- list-style-type: none;
65
- border: 2px solid red;
66
- border-radius: 0.5rem;
67
- margin: 10px;
68
- padding: 10;
69
- width: 20%;
70
- overflow: auto;
71
- height: 85%;
72
- text-align: left;
73
- background-color: rgba(0, 0, 0, 0.4);
74
- top: 6.4%;
75
- position: fixed;
64
+ list-style-type: none;
65
+ border: 2px solid red;
66
+ border-radius: 0.5rem;
67
+ margin: 10px;
68
+ padding: 10;
69
+ width: 20%;
70
+ overflow: auto;
71
+ height: 85%;
72
+ text-align: left;
73
+ background-color: rgba(0, 0, 0, 0.4);
74
+ top: 6.4%;
75
+ position: fixed;
76
76
  }
77
77
 
78
78
  .page {
79
- margin: 0;
80
- right: 0;
79
+ margin: 0;
80
+ right: 0;
81
81
  }
82
82
 
83
83
  #page {
84
- position: absolute;
85
- right: 0;
86
- width: 75vmax;
84
+ position: absolute;
85
+ right: 0;
86
+ width: 75vmax;
87
87
  }
88
88
 
89
89
  .component {
90
- border-radius: 0.5rem;
91
- border: 2px solid red;
92
- padding: 10;
93
- margin: 10px;
94
- background-color: #53565a;
95
- box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
96
- right: 0;
90
+ border-radius: 0.5rem;
91
+ border: 2px solid red;
92
+ padding: 10;
93
+ margin: 10px;
94
+ background-color: #53565a;
95
+ box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
96
+ right: 0;
97
97
  }
98
98
 
99
99
  .index {
100
- align-items: left;
100
+ align-items: left;
101
101
  }
102
102
 
103
103
  table {
104
- border-collapse: collapse;
105
- display: block;
106
- overflow-x: auto;
107
- white-space: nowrap;
108
- width: 100%;
104
+ border-collapse: collapse;
105
+ display: block;
106
+ overflow-x: auto;
107
+ white-space: nowrap;
108
+ width: 100%;
109
109
  }
110
110
 
111
111
  tr,
112
112
  td {
113
- align-items: center;
114
- width: 100%;
115
- padding: 10;
116
- border: 2px solid red;
113
+ align-items: center;
114
+ width: 100%;
115
+ padding: 10;
116
+ border: 2px solid red;
117
117
  }
118
118
 
119
119
  #table-header {
120
- background-color: rgba(0, 0, 0, 0.4);
120
+ background-color: rgba(0, 0, 0, 0.4);
121
121
  }
122
122
 
123
123
  .button {
124
- font-family: Arial;
125
- color: black;
126
- border-radius: 0.5rem;
127
- background-color: red; /* Green */
128
- border: none;
129
- padding: 15px 32px;
130
- text-align: center;
131
- text-decoration: none;
132
- display: inline-block;
133
- font-size: 20;
124
+ font-family: Arial;
125
+ color: black;
126
+ border-radius: 0.5rem;
127
+ background-color: red; /* Green */
128
+ border: none;
129
+ padding: 15px 32px;
130
+ text-align: center;
131
+ text-decoration: none;
132
+ display: inline-block;
133
+ font-size: 20;
134
134
  }
135
135
 
136
136
  .select {
137
- background: none;
138
- border: none;
139
- text-decoration: none;
140
- color: white;
141
- cursor: pointer;
142
- font-family: inherit;
143
- font-size: inherit;
144
- cursor: pointer;
145
- padding: 0;
146
- border: 2px solid red;
147
- width: 100%;
148
- border-radius: 0.5rem;
137
+ background: none;
138
+ border: none;
139
+ text-decoration: none;
140
+ color: white;
141
+ cursor: pointer;
142
+ font-family: inherit;
143
+ font-size: inherit;
144
+ cursor: pointer;
145
+ padding: 0;
146
+ border: 2px solid red;
147
+ width: 100%;
148
+ border-radius: 0.5rem;
149
149
  }
150
150
 
151
151
  .select:hover {
152
- background-color: none;
153
- background: none;
154
- text-decoration: none;
152
+ background-color: none;
153
+ background: none;
154
+ text-decoration: none;
155
155
  }
package/models/Client.js CHANGED
@@ -17,6 +17,7 @@ class Client extends Discord.Client {
17
17
  guildId: s.string.default(undefined),
18
18
  global: s.boolean.default(false),
19
19
  prefix: s.array(s.string).default([]),
20
+ mentionPrefix: s.boolean.optional,
20
21
  ownerId: s.array(s.string).default([]),
21
22
  ignoreOwner: s.boolean.default(false),
22
23
  defaultCooldown: s.number.default(0),
@@ -38,7 +38,7 @@ class BuildInInteractionEvent extends Event {
38
38
  if (commandValidation(interaction, command)) return;
39
39
 
40
40
  try {
41
- if (await command.conditions(interaction, { group, subcommand, args })) return;
41
+ if (command.conditions && await command.conditions(interaction, { group, subcommand, args })) return;
42
42
 
43
43
  await command.exec(interaction, { group, subcommand, args });
44
44
 
@@ -59,7 +59,7 @@ class BuildInInteractionEvent extends Event {
59
59
  command.client = interaction.client;
60
60
 
61
61
  try {
62
- if (await command.conditions(interaction)) return;
62
+ if (command.conditions && await command.conditions(interaction)) return;
63
63
 
64
64
  await command.exec(interaction);
65
65
 
@@ -39,13 +39,15 @@ class BuildInMessageEvent extends Event {
39
39
  };
40
40
  })
41
41
 
42
- if (message?.client?.settings?.prefix?.length <= 0) return;
42
+ if (message?.client?.settings?.prefix?.length <= 0 && !message.client.settings.mentionPrefix) return;
43
43
 
44
44
  commands.filter(c => !c.regex).map(async command => {
45
45
  command?.prefix?.map(prefix => {
46
46
  this.commandCheck(message, prefix, command);
47
47
  })
48
48
 
49
+ if (message.client.settings.mentionPrefix && !message.client.settings.prefix.includes(`<@${message.client.user.id}>`)) message.client.settings.prefix.push(`<@${message.client.user.id}>`)
50
+
49
51
  message.client.settings.prefix.map(prefix => {
50
52
  this.commandCheck(message, prefix, command);
51
53
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xernerx",
3
- "version": "2.6.8",
3
+ "version": "2.7.0",
4
4
  "description": "A bot framework for discord.js. [BETA]",
5
5
  "main": "main.js",
6
6
  "scripts": {