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
export type PopularRooms = { | |
rooms: { | |
voiceServerId: string; | |
peoplePreviewList: { | |
numFollowers: number; | |
id: string; | |
displayName: string; | |
}[]; | |
numPeopleInside: number; | |
name: string; |
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
while : | |
do | |
node . | |
done |
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
import { User } from "../typings/Database"; | |
import * as admin from "firebase-admin"; | |
const serviceAccount = require("../../firebaseadmin.json"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: | |
"https://dodgycoin-default-rtdb.europe-west1.firebasedatabase.app", | |
}); |
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
import db from "../libs/database"; | |
import { DBUserProfile } from "./types"; | |
const getUser = (id: string): Promise<DBUserProfile> => | |
new Promise((res, rej) => | |
db | |
.ref("users") | |
.orderByChild("id") | |
.equalTo(id) | |
.once("value", (snap) => { |
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
export type PopularRooms = { | |
rooms: { | |
voiceServerId: string; | |
peoplePreviewList: { | |
numFollowers: number; | |
id: string; | |
displayName: string; | |
}[]; | |
numPeopleInside: number; | |
name: string; |
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
import { CommandInput } from "./CommandInput"; | |
import { getUser, setMonies } from "../totallyARealDB"; | |
import { addMessageToQueue } from "../queue"; | |
export async function coinflip({ wrapper, msg, userId }: CommandInput) { | |
if (msg.tokens[1]) { | |
const user = getUser(userId); | |
const amount = parseInt(msg.tokens[1].v as string, 10); | |
if (typeof amount === "number") { | |
if (amount > 0) { |
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 message = { | |
userId: '8f77004b-011d-4c6a-9104-05cbe843ab43', | |
tokens: [ | |
{ v: 'wanted', t: 'text' }, | |
{ v: 'to', t: 'text' }, | |
{ v: 'suggest', t: 'text' }, | |
{ v: 'a', t: 'text' }, | |
{ v: 'API', t: 'text' }, | |
{ v: 'documentation', t: 'text' }, | |
{ v: 'tool', t: 'text' }, |
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
type Message = { | |
userId: string; | |
tokens: { v: string; t: "text" | "mention" | string }[]; | |
sentAt: string; | |
isWhisper: false; | |
id: string; | |
displayName: string; | |
avatarUrl: string; | |
}; |
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
from [768] | |
import [759] | |
const [596] | |
t [446] | |
d [441] | |
c [405] | |
div [376] | |
x [353] | |
v [335] | |
s [331] |
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
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import * as Sentry from "@sentry/react"; | |
import ReactModal from "react-modal"; | |
import "react-toastify/dist/ReactToastify.css"; | |
import "./index.css"; | |
import { init_i18n } from "./i18n"; | |
import { Providers } from "./Providers"; | |
import { App } from "./app/App"; |