19 lines
488 B
TypeScript
19 lines
488 B
TypeScript
import { Request, Response } from "express";
|
|
import { client as bot } from "@bot/bot";
|
|
|
|
export const get = async (request: Request, response: Response) => {
|
|
const guildId = request.params.guildId;
|
|
const guild = bot.guilds.cache.get(guildId);
|
|
|
|
if (!guild) {
|
|
response.status(404).send("404: guild not found");
|
|
return;
|
|
}
|
|
|
|
response.render("guild/overview", {
|
|
title: `${guild.name} - Relay`,
|
|
guild: guild,
|
|
});
|
|
};
|
|
|
|
export default { get }; |