This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#singleInstance, force | |
Setup := 0 | |
Weapon := 0 | |
*1::changeSetup() | |
changeSetup() { | |
global Setup | |
if (Setup < 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gifFrames = require('gif-frames'); // @1.0.1 | |
const { createCanvas, loadImage } = require('canvas'); // @2.10.2 | |
const GifEncoder = require('gif-encoder'); // 0.4.3 | |
const fs = require("fs"); | |
convertBanner(); | |
async function convertBanner() { | |
const originalFrames = await gifFrames({ url: 'source.gif', frames: "all" }).catch(console.error); | |
if (!originalFrames) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
VBR="4500k" # Битрейт видео | |
FPS="60" # FPS | |
QUAL="veryfast" # Пресет качества для FFmpeg | |
TWITCH_URL="rtmp://live-hel.twitch.tv/app" # URL RTMP Twitch | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL RTMP YouTube | |
FOLDER="day" # Имя папки с видео роликами | |
KEY="170j" # Ключ потока |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Пример использования Autocomplete-опции Slash-команды на базе шаблона (хандлера) DiscordBotIda: | |
* https://github.com/idaspin/DiscordBotIda/ | |
* Установка: установить модуль rss-parser; Перенести файл Habrahabr.js в папку /commands/ | |
*/ | |
'use strict'; | |
const BaseCommand = require('../structures/BaseCommand'), | |
{ ApplicationCommandType, ApplicationCommandOptionType, AttachmentBuilder, EmbedBuilder, Collection } = require('discord.js'), | |
Parser = require('rss-parser'), | |
parser = new Parser(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client, GatewayIntentBits } = require('discord.js'), // discord.js@14.0.3 | |
client = new Client({ intents: [ GatewayIntentBits.Guilds ] }); | |
client.login("your bot token") | |
.then(() => { | |
timeout1h(); | |
}); | |
async function timeout1h() { | |
setTimeout(timeout1h, 1000 * 60 * 60); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client, Intents, MessageEmbed, MessageActionRow, MessageButton } = require('discord.js'), | |
client = new Client({ intents: [Intents.FLAGS.GUILDS ] }), | |
fs = require('fs'); | |
client.login("your bot token") | |
.then(() => { | |
client.db = require('quick.db'); // quick.db@^7.1.3 | |
timeout1h(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client, Intents, MessageEmbed, MessageActionRow, MessageButton } = require('discord.js'), | |
client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES ] }), | |
dsModals = require('discord-modals'), | |
{ Modal, TextInputComponent, showModal } = require('discord-modals'); | |
dsModals(client); | |
var config = { | |
token: "your bot token", | |
prefix: "/", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client, Intents, Collection } = require('discord.js'), | |
client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES ] }), | |
fs = require('fs'); | |
client.db = require("quick.db"); | |
client.commands = new Collection(); | |
client.applicationCommands = []; | |
var config = { | |
token: "your bot token", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const help = { | |
name: "coin", | |
usage: "Flip a coin" | |
}; | |
module.exports = { | |
help: help, | |
messageExecute(client, opts) { | |
exec(client, opts); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client, Intents, MessageEmbed, MessageActionRow, MessageButton } = require('discord.js'), | |
client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES ] }); | |
client.db = require("quick.db"); | |
var config = { | |
token: "your bot token", | |
prefix: "/", | |
adminID: "admin id", | |
embed_color: "#ffffff" |
NewerOlder