Skip to content

Commit

Permalink
saver stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
akpi816218 committed Sep 14, 2024
1 parent 3bdb5c3 commit 2591728
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 79 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
botfiles/*.db.json
*TOKEN*
node_modules
package-lock.json
._*
.DS_Store
.Trashes
*.env*
*.env.*
.space
dist
6 changes: 0 additions & 6 deletions .npmignore

This file was deleted.

28 changes: 20 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"description": "",
"devDependencies": {
"@octokit/types": "^13.5.0",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/node-schedule": "^2.1.7",
Expand Down
32 changes: 0 additions & 32 deletions src/commands/donate.tsdisabled

This file was deleted.

1 change: 1 addition & 0 deletions src/commands/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ const Handlers: {
BaseEmbed(interaction)
.setDescription(null)
.setFields(
// @ts-expect-error octokit types are weird
...data.map(repo => ({
name: repo.name,
value:
Expand Down
5 changes: 0 additions & 5 deletions src/commands/msg.json.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/interactionHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,6 @@ export const InteractionHandlers = {
interaction: MessageContextMenuCommandInteraction
): Promise<void> {
switch (interaction.commandName) {
case 'Message JSON': {
const json = await format(
JSON.stringify(interaction.targetMessage.toJSON()),
{
parser: 'json5',
tabWidth: 2,
useTabs: false
}
);
if (json.length > 1990) {
if (
!interaction.channel?.isTextBased() ||
interaction.channel instanceof StageChannel
)
return;
await interaction.reply(
'JSON is too long, sending in multiple messages...'
);
const jsons = json.match(/[\s\S]{1,1990}/g) || [];
for (const json of jsons) {
await interaction.channel.send(codeBlock(json));
}
} else await interaction.reply(codeBlock(json));
break;
}
}
},
async User(interaction: UserContextMenuCommandInteraction): Promise<void> {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"skipLibCheck": true,
"target": "ESNext",
"lib": ["ESNext", "ES2022", "ES5", "ES6"],
"noEmit": true,
"resolveJsonModule": true,
"isolatedModules": true,
"alwaysStrict": true
Expand Down

0 comments on commit 2591728

Please sign in to comment.