first commit

This commit is contained in:
imbwbl 2024-01-18 22:40:05 +01:00
commit db4388e70a
13 changed files with 528 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
config.json
node_modules/
node_modules/*

5
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

12
.idea/1m04.iml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/1m04.iml" filepath="$PROJECT_DIR$/.idea/1m04.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

18
commands/help.js Normal file
View File

@ -0,0 +1,18 @@
import { SlashCommandBuilder} from "discord.js";
import fs from "fs";
export const data = new SlashCommandBuilder()
.setName('help')
.setDescription('show helping message')
export async function execute(interaction) {
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
const commands = []
for (const file of commandFiles) {
const command = await import(`./${file}`)
commands.push(`/**${command.data.name}**: *${command.data.description}* \r`)
}
interaction.reply(commands.join('\r'))
}

58
commands/porn.js Normal file
View File

@ -0,0 +1,58 @@
import { SlashCommandBuilder} from "discord.js";
export const data = new SlashCommandBuilder()
.setName('porn')
.setDescription('negros penis porno')
export async function execute(interaction, defer=false) {
if (!defer) await interaction.deferReply()
if (interaction.channel.nsfw) {
const options = {
method: 'GET',
headers: {cookie: '__ddg1_=Go9PkjVipnvcmvVee5Qq', 'User-Agent': 'insomnia/8.5.1'}
};
const userListG = [
/*"f1nn5ter",
"kianavi",
"itspurplebitch",
"averyellisxo",
"astolfitoliz",
"trappy-chan",
"trappybae",*/
"ickyy",
]
const userListGIndex = Math.floor(Math.random() * userListG.length)
const getLink = await fetch(`https://coomer.party/api/v1/onlyfans/user/${userListG[userListGIndex]}`, options)
.then(response => response.json())
.then(response => {
let i = Math.floor(Math.random() * response.length)
let ip = Math.floor(Math.random() * response[i].attachments.length)
if (response.length === 0 || response[i].attachments.length === 0) {
return null
}
return "https://coomer.su" + response[i].attachments[ip].path
})
if (!getLink) {
return execute(interaction, true)
}
await fetch(getLink, options)
.then(response => {
interaction.editReply({
content: '',
files: [{
attachment: response.body,
name: 'image.png'
}]
});
})
} else {
interaction.reply({
content: "This command can only be used in NSFW channels",
ephemeral: true
})
}
}

10
events/ready.js Normal file
View File

@ -0,0 +1,10 @@
import {ActivityType} from "discord.js";
export async function execute(client) {
client.user.setPresence({
activities: [{name: `Ankhal`, type: ActivityType.Listening}],
status: 'idle',
afk: true
});
client.user.setStatus('idle')
client.user.setAFK(true)
}

View File

@ -0,0 +1,3 @@
export async function execute(client, oldMember, newMember) {
}

63
main.js Normal file
View File

@ -0,0 +1,63 @@
import {
Client,
GatewayIntentBits,
REST,
Routes,
Collection,
EmbedBuilder,
ChannelType,
PermissionsBitField
} from "discord.js";
import config from "./config.json" with { type: "json" };
import fs from "fs";
export const client = new Client({intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates,]});
const clientCommands = new Collection();
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
const commands = [];
for (const file of commandFiles) {
const command = await import(`./commands/${file}`)
commands.push(command.data.toJSON())
if (command.data.name) {
clientCommands.set(command.data.name, command);
}
}
const eventFiles = fs.readdirSync('./events').filter(file => file.endsWith('.js'));;
for (const file of eventFiles) {
const event = await import(`./events/${file}`)
const name = file.split('.')[0];
if (event.once) {
client.once(name, (...args) => event.execute(...args));
} else {
client.on(name, (...args) => event.execute(...args));
}
}
//console.log(clientCommands);
const rest = new REST({version: '10'}).setToken(config.token);
(async () => {
try {
console.log('Started refreshing application (/) commands.');
await rest.put(Routes.applicationCommands(config.id), {body: commands});
console.log('Successfully reloaded application (/) commands.');
} catch (error) {
console.error(error);
}
})();
client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;
const command = clientCommands.get(interaction.commandName);
await command.execute(interaction)
});
client.login(config.token);

19
package.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "1M04",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@types/node": "^20.11.5",
"discord.js": "^14.14.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
}

317
pnpm-lock.yaml Normal file
View File

@ -0,0 +1,317 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@types/node':
specifier: ^20.11.5
version: 20.11.5
discord.js:
specifier: ^14.14.1
version: 14.14.1
ts-node:
specifier: ^10.9.2
version: 10.9.2(@types/node@20.11.5)(typescript@5.3.3)
typescript:
specifier: ^5.3.3
version: 5.3.3
packages:
/@cspotcode/source-map-support@0.8.1:
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
engines: {node: '>=12'}
dependencies:
'@jridgewell/trace-mapping': 0.3.9
dev: false
/@discordjs/builders@1.7.0:
resolution: {integrity: sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==}
engines: {node: '>=16.11.0'}
dependencies:
'@discordjs/formatters': 0.3.3
'@discordjs/util': 1.0.2
'@sapphire/shapeshift': 3.9.5
discord-api-types: 0.37.61
fast-deep-equal: 3.1.3
ts-mixer: 6.0.3
tslib: 2.6.2
dev: false
/@discordjs/collection@1.5.3:
resolution: {integrity: sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==}
engines: {node: '>=16.11.0'}
dev: false
/@discordjs/collection@2.0.0:
resolution: {integrity: sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==}
engines: {node: '>=18'}
dev: false
/@discordjs/formatters@0.3.3:
resolution: {integrity: sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==}
engines: {node: '>=16.11.0'}
dependencies:
discord-api-types: 0.37.61
dev: false
/@discordjs/rest@2.2.0:
resolution: {integrity: sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==}
engines: {node: '>=16.11.0'}
dependencies:
'@discordjs/collection': 2.0.0
'@discordjs/util': 1.0.2
'@sapphire/async-queue': 1.5.1
'@sapphire/snowflake': 3.5.1
'@vladfrangu/async_event_emitter': 2.2.4
discord-api-types: 0.37.61
magic-bytes.js: 1.8.0
tslib: 2.6.2
undici: 5.27.2
dev: false
/@discordjs/util@1.0.2:
resolution: {integrity: sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==}
engines: {node: '>=16.11.0'}
dev: false
/@discordjs/ws@1.0.2:
resolution: {integrity: sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==}
engines: {node: '>=16.11.0'}
dependencies:
'@discordjs/collection': 2.0.0
'@discordjs/rest': 2.2.0
'@discordjs/util': 1.0.2
'@sapphire/async-queue': 1.5.1
'@types/ws': 8.5.9
'@vladfrangu/async_event_emitter': 2.2.4
discord-api-types: 0.37.61
tslib: 2.6.2
ws: 8.14.2
transitivePeerDependencies:
- bufferutil
- utf-8-validate
dev: false
/@fastify/busboy@2.1.0:
resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
engines: {node: '>=14'}
dev: false
/@jridgewell/resolve-uri@3.1.1:
resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
engines: {node: '>=6.0.0'}
dev: false
/@jridgewell/sourcemap-codec@1.4.15:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
dev: false
/@jridgewell/trace-mapping@0.3.9:
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
dev: false
/@sapphire/async-queue@1.5.1:
resolution: {integrity: sha512-1RdpsmDQR/aWfp8oJzPtn4dNQrbpqSL5PIA0uAB/XwerPXUf994Ug1au1e7uGcD7ei8/F63UDjr5GWps1g/HxQ==}
engines: {node: '>=v14.0.0', npm: '>=7.0.0'}
dev: false
/@sapphire/shapeshift@3.9.5:
resolution: {integrity: sha512-AGdHe+51gF7D3W8hBfuSFLBocURDCXVQczScTHXDS3RpNjNgrktIx/amlz5y8nHhm8SAdFt/X8EF8ZSfjJ0tnA==}
engines: {node: '>=v18'}
dependencies:
fast-deep-equal: 3.1.3
lodash: 4.17.21
dev: false
/@sapphire/snowflake@3.5.1:
resolution: {integrity: sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==}
engines: {node: '>=v14.0.0', npm: '>=7.0.0'}
dev: false
/@tsconfig/node10@1.0.9:
resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==}
dev: false
/@tsconfig/node12@1.0.11:
resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==}
dev: false
/@tsconfig/node14@1.0.3:
resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==}
dev: false
/@tsconfig/node16@1.0.4:
resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==}
dev: false
/@types/node@20.11.5:
resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==}
dependencies:
undici-types: 5.26.5
dev: false
/@types/ws@8.5.9:
resolution: {integrity: sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==}
dependencies:
'@types/node': 20.11.5
dev: false
/@vladfrangu/async_event_emitter@2.2.4:
resolution: {integrity: sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug==}
engines: {node: '>=v14.0.0', npm: '>=7.0.0'}
dev: false
/acorn-walk@8.3.2:
resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==}
engines: {node: '>=0.4.0'}
dev: false
/acorn@8.11.3:
resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: false
/arg@4.1.3:
resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}
dev: false
/create-require@1.1.1:
resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==}
dev: false
/diff@4.0.2:
resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}
engines: {node: '>=0.3.1'}
dev: false
/discord-api-types@0.37.61:
resolution: {integrity: sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==}
dev: false
/discord.js@14.14.1:
resolution: {integrity: sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==}
engines: {node: '>=16.11.0'}
dependencies:
'@discordjs/builders': 1.7.0
'@discordjs/collection': 1.5.3
'@discordjs/formatters': 0.3.3
'@discordjs/rest': 2.2.0
'@discordjs/util': 1.0.2
'@discordjs/ws': 1.0.2
'@sapphire/snowflake': 3.5.1
'@types/ws': 8.5.9
discord-api-types: 0.37.61
fast-deep-equal: 3.1.3
lodash.snakecase: 4.1.1
tslib: 2.6.2
undici: 5.27.2
ws: 8.14.2
transitivePeerDependencies:
- bufferutil
- utf-8-validate
dev: false
/fast-deep-equal@3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
dev: false
/lodash.snakecase@4.1.1:
resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==}
dev: false
/lodash@4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
dev: false
/magic-bytes.js@1.8.0:
resolution: {integrity: sha512-lyWpfvNGVb5lu8YUAbER0+UMBTdR63w2mcSUlhhBTyVbxJvjgqwyAf3AZD6MprgK0uHuBoWXSDAMWLupX83o3Q==}
dev: false
/make-error@1.3.6:
resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==}
dev: false
/ts-mixer@6.0.3:
resolution: {integrity: sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==}
dev: false
/ts-node@10.9.2(@types/node@20.11.5)(typescript@5.3.3):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
'@swc/core': '>=1.2.50'
'@swc/wasm': '>=1.2.50'
'@types/node': '*'
typescript: '>=2.7'
peerDependenciesMeta:
'@swc/core':
optional: true
'@swc/wasm':
optional: true
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.9
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.11.5
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
typescript: 5.3.3
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: false
/tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
dev: false
/typescript@5.3.3:
resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==}
engines: {node: '>=14.17'}
hasBin: true
dev: false
/undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
dev: false
/undici@5.27.2:
resolution: {integrity: sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==}
engines: {node: '>=14.0'}
dependencies:
'@fastify/busboy': 2.1.0
dev: false
/v8-compile-cache-lib@3.0.1:
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
dev: false
/ws@8.14.2:
resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==}
engines: {node: '>=10.0.0'}
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: '>=5.0.2'
peerDependenciesMeta:
bufferutil:
optional: true
utf-8-validate:
optional: true
dev: false
/yn@3.1.1:
resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==}
engines: {node: '>=6'}
dev: false