Skip to content

Instantly share code, notes, and snippets.

@flazepe
flazepe / bot.js
Created September 13, 2020 10:22
old old old version of aeon in one file because
//
//
//
// Bot Configuration
//
//
//
const beta = 1;

Keybase proof

I hereby claim:

  • I am flazepe on github.
  • I am flazepe (https://keybase.io/flazepe) on keybase.
  • I have a public key ASAEo7DbQZ1svuvmz8AuQsHogzjrQyGoTft4K--MO6NKOwo

To claim this, I am signing this object:

@flazepe
flazepe / voice-message-1.mjs
Last active February 3, 2024 16:24
2 ways to send a Discord voice message using a bot token
import { readFileSync, statSync } from "fs";
import { getAudioDurationInSeconds } from "get-audio-duration";
const botToken = "Njc1NTM5NTEyOTEwMTUxNjkx.GCAq4j.VaRQAFI6hBrgvcVPi_wY4zCzT4G-2D60h5mw7g",
channelID = "732171142344736818",
audioPath = "path/to/audio/file";
const body = new FormData();
body.append("files[0]", new Blob([readFileSync(audioPath)]), "voice-message.ogg");