ethan!
ethan!
Explore posts from servers
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
👍
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
why are you being so rude?
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
was working fine earlier
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
is there an outage or smth?
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
restarting my pc didnt fix it
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
oh idk how to do that
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
but ive force closed it in TM
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
says riot is still running
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
can't
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
i wanna save my settings
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
yeah no i cant do shit
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
wtf are we supposed to do
48 replies
VVALORANT
Created by Riku on 7/7/2024 in #community-help
I cant open valorant:(help)
me too..
48 replies
NNuxt
Created by ethan! on 6/28/2024 in #❓・help
API route called multiple times
after that they load fine
15 replies
NNuxt
Created by ethan! on 6/28/2024 in #❓・help
API route called multiple times
? but it only happens when i first start the project
15 replies
NNuxt
Created by ethan! on 6/28/2024 in #❓・help
API route called multiple times
@manniL / TheAlexLichter okay so it only seems to do it when im on the page then i restart
15 replies
NNuxt
Created by ethan! on 6/28/2024 in #❓・help
API route called multiple times
i dont know
15 replies
NNuxt
Created by ethan! on 6/28/2024 in #❓・help
API route called multiple times
<template>
<div class="mt-20 mb-10">
<h1 class="text-5xl font-bold">Select a server</h1>
<h2 class="text-xl text-muted-foreground mb-5">You manage <span class="text-primary">{{ user?.guilds.length }}</span> servers</h2>

<Button variant="outline" @click="refreshGuilds">
<Icon icon="radix-icons:reload" class="mr-2 h-5 w-5" />
<span class="text-base">Refresh</span>
</Button>

<div class="mx-1 h-px bg-muted my-10" />
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-9">
<Card v-for="(guild, i) in guilds" :key="i" class="flex flex-col justify-between flex-grow">
<CardHeader>
<img :src="`https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.png`" alt="icon" height="70" width="70" class="rounded-full">
<CardTitle class="pt-3 text-lg break-words">{{ guild.name }}</CardTitle>
<CardDescription class="text-base">{{ guild.owner ? 'Owner' : 'Server Manager' }}</CardDescription>
</CardHeader>
<CardFooter>
<Button :variant="guild.botInGuild ? 'default' : 'outline'" class="w-full text-base">
<RouterLink :external="guild.botInGuild ? false : true" :to="guild.botInGuild ? `/dashboard/${guild.id}/member-screening` : `https://discord.com/oauth2/authorize?client_id=${runtimeConfig.public.url}&guild_id=${guild.id}&redirect_uri=${encodeURIComponent(`${runtimeConfig.public.url}/dashboard`)}&response_type=code&permissions=8&scope=bot`">
{{ guild.botInGuild ? 'Configure' : 'Add Bot' }}
</RouterLink>
</Button>
</CardFooter>
</Card>
</div>
</template>

<script setup lang="ts">
import { Icon } from "@iconify/vue";
import { useToast } from "@/components/ui/toast/use-toast";

const { toast } = useToast();
const runtimeConfig = useRuntimeConfig();

const user = useUser();
const { data: guilds } = useFetch("/api/discord/guilds");

async function refreshGuilds() { // TODO: ratelimit
if(!user) return toast({ title: "Uh oh! Something went wrong.", description: "If this issue persists, please contact the site manager." });

// TODO
}
</script>
<template>
<div class="mt-20 mb-10">
<h1 class="text-5xl font-bold">Select a server</h1>
<h2 class="text-xl text-muted-foreground mb-5">You manage <span class="text-primary">{{ user?.guilds.length }}</span> servers</h2>

<Button variant="outline" @click="refreshGuilds">
<Icon icon="radix-icons:reload" class="mr-2 h-5 w-5" />
<span class="text-base">Refresh</span>
</Button>

<div class="mx-1 h-px bg-muted my-10" />
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-9">
<Card v-for="(guild, i) in guilds" :key="i" class="flex flex-col justify-between flex-grow">
<CardHeader>
<img :src="`https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.png`" alt="icon" height="70" width="70" class="rounded-full">
<CardTitle class="pt-3 text-lg break-words">{{ guild.name }}</CardTitle>
<CardDescription class="text-base">{{ guild.owner ? 'Owner' : 'Server Manager' }}</CardDescription>
</CardHeader>
<CardFooter>
<Button :variant="guild.botInGuild ? 'default' : 'outline'" class="w-full text-base">
<RouterLink :external="guild.botInGuild ? false : true" :to="guild.botInGuild ? `/dashboard/${guild.id}/member-screening` : `https://discord.com/oauth2/authorize?client_id=${runtimeConfig.public.url}&guild_id=${guild.id}&redirect_uri=${encodeURIComponent(`${runtimeConfig.public.url}/dashboard`)}&response_type=code&permissions=8&scope=bot`">
{{ guild.botInGuild ? 'Configure' : 'Add Bot' }}
</RouterLink>
</Button>
</CardFooter>
</Card>
</div>
</template>

<script setup lang="ts">
import { Icon } from "@iconify/vue";
import { useToast } from "@/components/ui/toast/use-toast";

const { toast } = useToast();
const runtimeConfig = useRuntimeConfig();

const user = useUser();
const { data: guilds } = useFetch("/api/discord/guilds");

async function refreshGuilds() { // TODO: ratelimit
if(!user) return toast({ title: "Uh oh! Something went wrong.", description: "If this issue persists, please contact the site manager." });

// TODO
}
</script>
the page itself loads two times
15 replies
NNuxt
Created by ethan! on 6/28/2024 in #❓・help
API route called multiple times
well when the bot joins a server the info will be outdated so i cant really cache
15 replies
NNuxt
Created by ethan! on 6/28/2024 in #❓・help
API route called multiple times
i can assure you i have one call
15 replies