Remove premium features
This commit is contained in:
@ -10,18 +10,9 @@ export async function getGuildSetting(guildID: string): Promise<GuildSetting> {
|
||||
if (!guildSetting) {
|
||||
guildSetting = new GuildSetting();
|
||||
guildSetting.id = guildID;
|
||||
guildSetting.isPremiumUntil = null;
|
||||
guildSetting.notificationChannelID = null;
|
||||
guildSetting.preserveDataOnGuildLeave = false;
|
||||
}
|
||||
|
||||
return guildSetting;
|
||||
}
|
||||
|
||||
export function isPremiumActive(timestamp: Date | null): boolean {
|
||||
if (timestamp === null) return false;
|
||||
const now = Number(new Date());
|
||||
const activeUntil = Number(timestamp);
|
||||
|
||||
return now < activeUntil;
|
||||
}
|
Reference in New Issue
Block a user