mirror of
https://github.com/JustusPlays78/DiscordBot.git
synced 2025-06-27 21:35:16 +00:00
Delete text.js
This commit is contained in:
16
text.js
16
text.js
@ -1,16 +0,0 @@
|
||||
import fetch from "node-fetch";
|
||||
|
||||
|
||||
export async function fetchText(url){
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP-Fehler! Status: ${response.status}`);
|
||||
}
|
||||
const text = await response.text();
|
||||
return text; // Den Text zurückgeben
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Abrufen der Datei:', error);
|
||||
throw error; // Fehler weiterwerfen
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user