mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
moves random function
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { chooseRandom } from "./utils.ts";
|
||||
import { chooseRandom } from "./random.ts";
|
||||
|
||||
export class Collection<K, V> extends Map<K, V> {
|
||||
maxSize?: number;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export function chooseRandom<T>(array: T[]) {
|
||||
return array[Math.floor(Math.random() * array.length)];
|
||||
}
|
||||
@@ -27,10 +27,6 @@ export function editBotsStatus(
|
||||
sendGatewayCommand("EDIT_BOTS_STATUS", { status, game: { name, type } });
|
||||
}
|
||||
|
||||
export function chooseRandom<T>(array: T[]) {
|
||||
return array[Math.floor(Math.random() * array.length)];
|
||||
}
|
||||
|
||||
export async function urlToBase64(url: string) {
|
||||
const buffer = await fetch(url).then((res) => res.arrayBuffer());
|
||||
const imageStr = encode(buffer);
|
||||
|
||||
Reference in New Issue
Block a user