mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 02:02:14 +00:00
fix: crashing when slash command is used as text command (#349)
* progress on fix * fix: ids
This commit is contained in:
@@ -44,7 +44,10 @@ export class DefaultModuleManager implements ModuleManager {
|
||||
const publishable = 0b000000110;
|
||||
return Promise.all(
|
||||
Array.from(entries)
|
||||
.filter(([id]) => !(Number.parseInt(id.at(-1)!) & publishable))
|
||||
.filter(([id]) => {
|
||||
const last_entry = id.at(-1);
|
||||
return last_entry == 'B' || !(publishable & Number.parseInt(last_entry!));
|
||||
})
|
||||
.map(([, path]) => Files.importModule<CommandModule>(path)),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user