Skip to content

Instantly share code, notes, and snippets.

View Neodevils's full-sized avatar
:shipit:
On my way.

İbrahim Neodevils

:shipit:
On my way.
View GitHub Profile
@Neodevils
Neodevils / createWebhookMessage.js
Last active July 11, 2023 11:56
Creating A Webhook Message
interaction.channel.createWebhook({
name: "minesa",
avatar: "https://media.discordapp.net/attachments/861208192121569280/1075861709610299412/106327680.png",
reason: "This is needed for now"
}).then(webhook => console.log(webhook.url))
const { AttachmentBuilder, ButtonBuilder, ActionRowBuilder } = require("discord.js");
const file = new AttachmentBuilder()
.setFile("https://cdn.discordapp.com/attachments/861208192121569280/1026236427622695013/Adobe_Express_20221002_2352210_1.png")
@Neodevils
Neodevils / mobile-colors.html
Last active May 1, 2023 00:49
GitHub Syntax Highlight
<script> // #84bb81
const // #a04752
Uppercase // #db8043
method() // #9880c1
.property // #cedff2
this // #f7f9fc
text // #eff1f4
"String" // #87b4e8
// comments // #9a9ca1
</script> // Mobile Version
@Neodevils
Neodevils / index.html
Last active October 22, 2022 20:50
AnimeJS Staggered Grid Effect
<div id="tiles"></div>
<h1 id="title" class="centered">
The name of the game is
<span class="fancy">Chess</span>.
</h1>
<i id="icon" class="fa-solid fa-chess centered"></i>
<a id="source-link" class="meta-link" href="https://cdpn.io/YzXOGpm" target="_blank">
@Neodevils
Neodevils / factorial.js
Created October 23, 2022 12:07
Factorial
function factorial(n) {
let answer = 1;
if (n == 0 || n == 1) {
return answer;
} else {
for (var i = n; i >= 1; i--) {
answer = answer * i;
}
return answer;
}
@Neodevils
Neodevils / index.html
Created December 11, 2022 02:08
Sayı Arttırma veya Azaltma
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@neodevils</title>
<link rel="stylesheet" href="style.css">
</head>
@Neodevils
Neodevils / file-from-daki-messages.md
Created November 13, 2023 21:09
Connecting Your GitHub Repository to Pterodactyl Panel

Step 0. If you have a private repository

First create a personal access token as instructed on https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.

Skip step 1, go to 2, remove # from all the lines except first one and fill your details.

Step 1. Cloning your repository.

Set your startup command 1 to git clone https://github.com/awesumperson/bot (change the URL to the URL of your repo) in Daki panel settings, then run the bot. This should clone your repository into a folder inside your Daki container, which you should be then able to see inside Daki file manager. ‎

@Neodevils
Neodevils / rpc.js
Last active February 29, 2024 14:47
This is for RPC on Discord User Profile
import discordRPC from "discord-rpc";
const { Client, register } = discordRPC;
const CLIENT_ID = "736561919292473454"; // Your Discord Bot ID
const RPC = new Client({ transport: "ipc" });
register(CLIENT_ID);
async function activity() {
if (!RPC) return;
@Neodevils
Neodevils / app-banner.md
Created March 15, 2024 01:11
Code Snippet for Adding Banner to Discord App

App Banner Code

import fetch from "node-fetch";

async function updateBanner() {
    const BOT_TOKEN = "";
    try {
        const response = await fetch("https://discord.com/api/v10/users/@me", {
            method: "PATCH",
 headers: {
@Neodevils
Neodevils / fix-entry-point-error.js
Last active February 7, 2025 15:31
This is a code for fixing activity entry point error. It fetches commands from API and lets you delete it manually. Which you will get your launch command is ID and delete it manually so you won't have any error message on console.
/*
Author: @neodevils
Feel free to share it for others to don't deal with this issue when launching their activity on bot!
*/
import { REST } from "@discordjs/rest";
import { Routes } from "discord-api-types/v10";
import { CLIENT_ID, TOKEN } from "./config.js";
// Replace these with your actual values or fetch it from your config.js/json file
@Neodevils
Neodevils / migrate.js
Created February 3, 2025 22:40
Migrate your JSON files with this code to MongoDB.
import fs from "fs";
import path from "path";
import { MongoClient } from "mongodb";
// Replace these with your own values
const mongoUri = DATABASE_URI_HERE; // MongoDB connection URI
const dbName = "test"; // Database name
const collectionName = "users"; // Collection name
const folderPath = "./data"; // Path to the folder containing JSON files