Skip to content

Instantly share code, notes, and snippets.

View Neodevils's full-sized avatar
:fishsticks:
merged into fun

İbrahim Neodevils

:fishsticks:
merged into fun
View GitHub Profile
@Neodevils
Neodevils / update.js
Created October 22, 2025 01:14
Update server specific bot profile
import { Client, GatewayIntentBits } from "discord.js";
// ---------------- CONFIG ----------------
const TOKEN = ""; // Replace with your bot token
const GUILD_ID = ""; // Your target guild ID
// Discord CDN URLs
const AVATAR_URL = "";
const BANNER_URL = "";
const BIO_TEXT = ""; // Max 400 characters
@Neodevils
Neodevils / reset.css
Created September 2, 2025 09:53
Simplest CSS reset by Kevin Powell
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
font: inherit;
}
@Neodevils
Neodevils / scan_methods.py
Created March 21, 2025 22:46
A Python file to read ActionScript files to find methods.
import os
import re
def scan_as_files(directory, search_text):
files_found = []
pattern = re.compile(rf'\b{re.escape(search_text)}\b') # Ensure exact word match
print(f"Searching for: {search_text}") # Display search text in CMD
for filename in os.listdir(directory):
@Neodevils
Neodevils / Branching Rules.json
Created February 28, 2025 14:45
My branch & tag rules.
{
"id": 3843056,
"name": "Branching Rules",
"target": "branch",
"source_type": "Repository",
"source": "minesa-time/kaeru",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [
@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
@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 / 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 / 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 / startup.sh
Last active June 8, 2025 15:40
Connecting Your GitHub Repository to Pterodactyl Panel
#!/bin/bash
# Hata alırsa durdur
set -e
# Eğer kaeru dizini varsa, .env dosyasını yedekle ve güncelle; yoksa, repo'yu klonla
if [ -d "/home/container/kaeru" ]; then
echo "Kaeru dizini bulundu, güncellemeleri çekiyoruz..."
cd /home/container/kaeru
# .env dosyası varsa yedekle
@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;
}