Send the code block within a Discord channel:
import languages from "./languages";
import { codeBlock } from "discord.js";
return await interaction.reply({
content: codeBlock(languages.Python, "Hello World!"),
ephemeral: true
});| export default async function strictFetch<T>(url: string, options?: RequestInit): Promise<T> { | |
| const res = await fetch(url, options); | |
| const json = await res.json() as T; | |
| return json; | |
| } |
Send the code block within a Discord channel:
import languages from "./languages";
import { codeBlock } from "discord.js";
return await interaction.reply({
content: codeBlock(languages.Python, "Hello World!"),
ephemeral: true
});