Spaces:
Sleeping
Sleeping
Upload 28 files
Browse filesFiles changed (9)
- src/commands/leave-background.jsAdded+106
- src/commands/leave-message.jsAdded+72
- src/commands/preview.jsAdded+66
- src/commands/reset.jsAdded+56
- src/commands/setup.js+10-9
- src/commands/welcome-background.jsAdded+111
- src/commands/welcome-message.jsAdded+101
- src/storage/hfClient.js+18-4
- src/utils/retry.js+17-3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106import { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder, MessageFlags } from 'discord.js'
import { loadGuildConfig, setGuildConfig } from '../storage/cache.js'
import { uploadBinary } from '../storage/hfClient.js'
export const data = new SlashCommandBuilder()
.setName('leave-background')
.setDescription('Set the background image for the leave card')
.addSubcommand((sub) =>
sub
.setName('default')
.setDescription('Choose one of the built-in background styles')
.addStringOption((opt) =>
opt
.setName('style')
.setDescription('The background style to use')
.setRequired(true)
.addChoices(
{ name: 'Style 1', value: 'default1' },
{ name: 'Style 2', value: 'default2' },
{ name: 'Style 3', value: 'default3' }
)
)
)
.addSubcommand((sub) =>
sub
.setName('upload')
.setDescription('Upload a custom background image (PNG or JPG, 800x200)')
.addAttachmentOption((opt) =>
opt
.setName('image')
.setDescription('Upload a custom background image (PNG or JPG, 800x200)')
.setRequired(true)
)
)
export async function execute(interaction) {
if (!interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) {
await interaction.reply({
content: 'You need Manage Server permission to use this command.',
flags: MessageFlags.Ephemeral,
})
return
}
const sub = interaction.options.getSubcommand()
const guildId = interaction.guildId
if (sub === 'default') {
const style = interaction.options.getString('style')
const styleNames = { default1: 'Style 1', default2: 'Style 2', default3: 'Style 3' }
const config = await loadGuildConfig(guildId)
config.leaveBackground = style
await setGuildConfig(guildId, config)
const embed = new EmbedBuilder()
.setColor(0xed4245)
.setTitle('Leave Background Updated')
.setDescription('Background set to ' + styleNames[style])
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
if (sub === 'upload') {
await interaction.deferReply({ flags: MessageFlags.Ephemeral })
const attachment = interaction.options.getAttachment('image')
if (!attachment.contentType?.startsWith('image/')) {
await interaction.editReply({
content: 'Invalid file type. Please upload a PNG or JPG image.',
})
return
}
if (attachment.size > 2097152) {
await interaction.editReply({
content: 'File is too large. Maximum allowed size is 2MB.',
})
return
}
const response = await fetch(attachment.url)
const arrayBuffer = await response.arrayBuffer()
const buffer = Buffer.from(arrayBuffer)
await uploadBinary(
'guilds/' + guildId + '/assets/leave_bg.png',
buffer,
'image/png'
)
const config = await loadGuildConfig(guildId)
config.leaveBackground = 'custom'
await setGuildConfig(guildId, config)
const embed = new EmbedBuilder()
.setColor(0xed4245)
.setTitle('Leave Background Uploaded')
.setDescription('Your custom leave background is now active.')
await interaction.editReply({ embeds: [embed] })
return
}
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172import { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder, MessageFlags } from 'discord.js'
import { loadGuildConfig, setGuildConfig } from '../storage/cache.js'
import { parseTemplate } from '../utils/templateParser.js'
export const data = new SlashCommandBuilder()
.setName('leave-message')
.setDescription('Customize the leave message sent in the leave channel')
.addSubcommand((sub) =>
sub
.setName('set')
.setDescription('Set the leave message template')
.addStringOption((opt) =>
opt
.setName('message')
.setDescription('The leave message template')
.setRequired(true)
.setMinLength(1)
.setMaxLength(500)
)
)
.addSubcommand((sub) =>
sub
.setName('preview')
.setDescription('Preview the current leave message template')
)
export async function execute(interaction) {
if (!interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) {
await interaction.reply({
content: 'You need Manage Server permission to use this command.',
flags: MessageFlags.Ephemeral,
})
return
}
const sub = interaction.options.getSubcommand()
const guildId = interaction.guildId
if (sub === 'set') {
const message = interaction.options.getString('message')
const config = await loadGuildConfig(guildId)
config.leaveMessage = message
await setGuildConfig(guildId, config)
const embed = new EmbedBuilder()
.setColor(0xed4245)
.setTitle('Leave Message Updated')
.setDescription(`\`\`\`\n${message}\n\`\`\``)
.setFooter({ text: 'Variables: {user} {username} {server} {count}' })
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
if (sub === 'preview') {
const config = await loadGuildConfig(guildId)
const preview = parseTemplate(config.leaveMessage, {
user: '@YourName',
username: 'YourName',
server: interaction.guild.name,
count: interaction.guild.memberCount.toString(),
})
const embed = new EmbedBuilder()
.setColor(0xed4245)
.setTitle('Leave Message Preview')
.setDescription(preview)
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566import { SlashCommandBuilder, EmbedBuilder, AttachmentBuilder, MessageFlags } from 'discord.js'
import { loadGuildConfig } from '../storage/cache.js'
import { generateWelcomeCard } from '../canvas/welcomeCard.js'
import { generateLeaveCard } from '../canvas/leaveCard.js'
export const data = new SlashCommandBuilder()
.setName('preview')
.setDescription('Preview the welcome or leave card for this server')
.addSubcommand((sub) =>
sub
.setName('welcome')
.setDescription('Preview the welcome card')
)
.addSubcommand((sub) =>
sub
.setName('leave')
.setDescription('Preview the leave card')
)
export async function execute(interaction) {
const sub = interaction.options.getSubcommand()
const guildId = interaction.guildId
await interaction.deferReply({ flags: MessageFlags.Ephemeral })
const config = await loadGuildConfig(guildId)
const fakeMember = {
user: {
username: interaction.user.username,
displayAvatarURL: () =>
interaction.user.displayAvatarURL({ extension: 'png', size: 128 }),
id: interaction.user.id,
},
guild: interaction.guild,
toString: () => '<@' + interaction.user.id + '>',
}
if (sub === 'welcome') {
const buffer = await generateWelcomeCard(fakeMember, config)
const attachment = new AttachmentBuilder(buffer, { name: 'preview-welcome.png' })
const embed = new EmbedBuilder()
.setColor(0x5865f2)
.setTitle('Welcome Card Preview')
.setDescription('This is how your welcome card will look.')
.setImage('attachment://preview-welcome.png')
await interaction.editReply({ embeds: [embed], files: [attachment] })
return
}
if (sub === 'leave') {
const buffer = await generateLeaveCard(fakeMember, config)
const attachment = new AttachmentBuilder(buffer, { name: 'preview-leave.png' })
const embed = new EmbedBuilder()
.setColor(0xed4245)
.setTitle('Leave Card Preview')
.setDescription('This is how your leave card will look.')
.setImage('attachment://preview-leave.png')
await interaction.editReply({ embeds: [embed], files: [attachment] })
return
}
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556import { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder, MessageFlags } from 'discord.js'
import { initGuildConfig } from '../storage/cache.js'
export const data = new SlashCommandBuilder()
.setName('reset')
.setDescription('Reset all bot settings for this server to defaults')
.addSubcommand((sub) =>
sub
.setName('confirm')
.setDescription('Confirm the reset — this cannot be undone')
.addStringOption((opt) =>
opt
.setName('confirmation')
.setDescription('Type RESET to confirm')
.setRequired(true)
)
)
export async function execute(interaction) {
if (
!interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild) ||
!interaction.memberPermissions.has(PermissionFlagsBits.Administrator)
) {
await interaction.reply({
content: 'You need both Manage Server and Administrator permissions to use this command.',
flags: MessageFlags.Ephemeral,
})
return
}
const sub = interaction.options.getSubcommand()
if (sub === 'confirm') {
const confirmation = interaction.options.getString('confirmation')
if (confirmation !== 'RESET') {
await interaction.reply({
content: 'You must type RESET exactly to confirm.',
flags: MessageFlags.Ephemeral,
})
return
}
await initGuildConfig(interaction.guild.id)
const embed = new EmbedBuilder()
.setColor(0xed4245)
.setTitle('Server Config Reset')
.setDescription(
'All settings have been reset to defaults.\nYou will need to run /setup channels again.'
)
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
}2 unmodified lines34567863 unmodified lines7273747576777817 unmodified lines969798991001011024 unmodified lines1071081091101111121136 unmodified lines1201211221231241251264 unmodified lines1311321331341351361376 unmodified lines1441451461471481491503 unmodified lines1541551561571581591604 unmodified lines16516616716816917017111 unmodified lines1831841851861871881892 unmodified linesChannelType,PermissionFlagsBits,EmbedBuilder,} from 'discord.js'import { loadGuildConfig, setGuildConfig } from '../storage/cache.js'63 unmodified linesif (!interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) {await interaction.reply({content: 'You need Manage Server permission to use this command.',ephemeral: true,})return}17 unmodified lines`✅ Welcome channel set to ${welcome}\n✅ Leave channel set to ${leave}`)await interaction.reply({ embeds: [embed], ephemeral: true })return}4 unmodified linesif (config.autoRoles.includes(role.id)) {await interaction.reply({content: 'That role is already in the auto-assign list.',ephemeral: true,})return}6 unmodified lines.setTitle('Auto-Role Added').setDescription(`New members will now receive <@&${role.id}>`)await interaction.reply({ embeds: [embed], ephemeral: true })return}4 unmodified linesif (!config.autoRoles.includes(role.id)) {await interaction.reply({content: 'That role is not in the list.',ephemeral: true,})return}6 unmodified lines.setTitle('Auto-Role Removed').setDescription(`<@&${role.id}> will no longer be assigned to new members`)await interaction.reply({ embeds: [embed], ephemeral: true })return}3 unmodified linesif (!config.autoRoles.length) {await interaction.reply({content: 'No auto-roles configured.',ephemeral: true,})return}4 unmodified lines.setTitle('Auto-Assign Roles').setDescription(roleList)await interaction.reply({ embeds: [embed], ephemeral: true })return}11 unmodified lines`Welcome DMs are now **${enabled ? 'enabled' : 'disabled'}**`)await interaction.reply({ embeds: [embed], ephemeral: true })return}}2 unmodified lines345678963 unmodified lines7374757677787917 unmodified lines9798991001011021034 unmodified lines1081091101111121131146 unmodified lines1211221231241251261274 unmodified lines1321331341351361371386 unmodified lines1451461471481491501513 unmodified lines1551561571581591601614 unmodified lines16616716816917017117211 unmodified lines1841851861871881891902 unmodified linesChannelType,PermissionFlagsBits,EmbedBuilder,MessageFlags,} from 'discord.js'import { loadGuildConfig, setGuildConfig } from '../storage/cache.js'63 unmodified linesif (!interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) {await interaction.reply({content: 'You need Manage Server permission to use this command.',flags: MessageFlags.Ephemeral,})return}17 unmodified lines`✅ Welcome channel set to ${welcome}\n✅ Leave channel set to ${leave}`)await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })return}4 unmodified linesif (config.autoRoles.includes(role.id)) {await interaction.reply({content: 'That role is already in the auto-assign list.',flags: MessageFlags.Ephemeral,})return}6 unmodified lines.setTitle('Auto-Role Added').setDescription(`New members will now receive <@&${role.id}>`)await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })return}4 unmodified linesif (!config.autoRoles.includes(role.id)) {await interaction.reply({content: 'That role is not in the list.',flags: MessageFlags.Ephemeral,})return}6 unmodified lines.setTitle('Auto-Role Removed').setDescription(`<@&${role.id}> will no longer be assigned to new members`)await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })return}3 unmodified linesif (!config.autoRoles.length) {await interaction.reply({content: 'No auto-roles configured.',flags: MessageFlags.Ephemeral,})return}4 unmodified lines.setTitle('Auto-Assign Roles').setDescription(roleList)await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })return}11 unmodified lines`Welcome DMs are now **${enabled ? 'enabled' : 'disabled'}**`)await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })return}}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111import {
SlashCommandBuilder,
PermissionFlagsBits,
EmbedBuilder,
MessageFlags,
} from 'discord.js'
import { loadGuildConfig, setGuildConfig } from '../storage/cache.js'
import { uploadBinary } from '../storage/hfClient.js'
export const data = new SlashCommandBuilder()
.setName('welcome-background')
.setDescription('Set the background image for the welcome card')
.addSubcommand((sub) =>
sub
.setName('default')
.setDescription('Choose one of the built-in background styles')
.addStringOption((opt) =>
opt
.setName('style')
.setDescription('The background style to use')
.setRequired(true)
.addChoices(
{ name: 'Style 1', value: 'default1' },
{ name: 'Style 2', value: 'default2' },
{ name: 'Style 3', value: 'default3' }
)
)
)
.addSubcommand((sub) =>
sub
.setName('upload')
.setDescription('Upload a custom background image (PNG or JPG, 800x200)')
.addAttachmentOption((opt) =>
opt
.setName('image')
.setDescription('Upload a custom background image (PNG or JPG, 800x200)')
.setRequired(true)
)
)
export async function execute(interaction) {
if (!interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) {
await interaction.reply({
content: 'You need Manage Server permission to use this command.',
flags: MessageFlags.Ephemeral,
})
return
}
const sub = interaction.options.getSubcommand()
const guildId = interaction.guildId
if (sub === 'default') {
const style = interaction.options.getString('style')
const styleNames = { default1: 'Style 1', default2: 'Style 2', default3: 'Style 3' }
const config = await loadGuildConfig(guildId)
config.welcomeBackground = style
await setGuildConfig(guildId, config)
const embed = new EmbedBuilder()
.setColor(0x5865f2)
.setTitle('Welcome Background Updated')
.setDescription('Background set to ' + styleNames[style])
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
if (sub === 'upload') {
await interaction.deferReply({ flags: MessageFlags.Ephemeral })
const attachment = interaction.options.getAttachment('image')
if (!attachment.contentType?.startsWith('image/')) {
await interaction.editReply({
content: 'Invalid file type. Please upload a PNG or JPG image.',
})
return
}
if (attachment.size > 2097152) {
await interaction.editReply({
content: 'File is too large. Maximum allowed size is 2MB.',
})
return
}
const response = await fetch(attachment.url)
const arrayBuffer = await response.arrayBuffer()
const buffer = Buffer.from(arrayBuffer)
await uploadBinary(
'guilds/' + guildId + '/assets/welcome_bg.png',
buffer,
'image/png'
)
const config = await loadGuildConfig(guildId)
config.welcomeBackground = 'custom'
await setGuildConfig(guildId, config)
const embed = new EmbedBuilder()
.setColor(0x5865f2)
.setTitle('Welcome Background Uploaded')
.setDescription('Your custom welcome background is now active.')
await interaction.editReply({ embeds: [embed] })
return
}
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101import { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder, MessageFlags } from 'discord.js'
import { loadGuildConfig, setGuildConfig } from '../storage/cache.js'
import { parseTemplate } from '../utils/templateParser.js'
export const data = new SlashCommandBuilder()
.setName('welcome-message')
.setDescription('Customize the welcome message sent in the welcome channel')
.addSubcommand((sub) =>
sub
.setName('set')
.setDescription('Set the welcome message template')
.addStringOption((opt) =>
opt
.setName('message')
.setDescription('The welcome message template')
.setRequired(true)
.setMinLength(1)
.setMaxLength(500)
)
)
.addSubcommand((sub) =>
sub
.setName('set-dm')
.setDescription('Set the private DM sent to new members')
.addStringOption((opt) =>
opt
.setName('message')
.setDescription('The DM message template')
.setRequired(true)
.setMinLength(1)
.setMaxLength(1000)
)
)
.addSubcommand((sub) =>
sub
.setName('preview')
.setDescription('Preview the current welcome message template')
)
export async function execute(interaction) {
if (!interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) {
await interaction.reply({
content: 'You need Manage Server permission to use this command.',
flags: MessageFlags.Ephemeral,
})
return
}
const sub = interaction.options.getSubcommand()
const guildId = interaction.guildId
if (sub === 'set') {
const message = interaction.options.getString('message')
const config = await loadGuildConfig(guildId)
config.welcomeMessage = message
await setGuildConfig(guildId, config)
const embed = new EmbedBuilder()
.setColor(0x5865f2)
.setTitle('Welcome Message Updated')
.setDescription(`\`\`\`\n${message}\n\`\`\``)
.setFooter({ text: 'Variables: {user} {username} {server} {count}' })
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
if (sub === 'set-dm') {
const message = interaction.options.getString('message')
const config = await loadGuildConfig(guildId)
config.dmMessage = message
await setGuildConfig(guildId, config)
const embed = new EmbedBuilder()
.setColor(0x5865f2)
.setTitle('DM Message Updated')
.setDescription(`\`\`\`\n${message}\n\`\`\``)
.setFooter({ text: 'Variables: {username} {server}' })
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
if (sub === 'preview') {
const config = await loadGuildConfig(guildId)
const preview = parseTemplate(config.welcomeMessage, {
user: '@YourName',
username: 'YourName',
server: interaction.guild.name,
count: interaction.guild.memberCount.toString(),
})
const embed = new EmbedBuilder()
.setColor(0x5865f2)
.setTitle('Welcome Message Preview')
.setDescription(preview)
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral })
return
}
}6 unmodified lines789101112131415169 unmodified lines2627282930313216 unmodified lines4950515253548 unmodified lines6364656667685 unmodified lines747576777879807 unmodified lines888990919293946 unmodified linesif (!HF_TOKEN) throw new Error('Missing required environment variable: HF_TOKEN')if (!HF_BUCKET_NAME) throw new Error('Missing required environment variable: HF_BUCKET_NAME')// ✅ This is the key fix — type: 'bucket' instead of type: 'dataset'const repo = { type: 'bucket', name: HF_BUCKET_NAME }const credentials = { accessToken: HF_TOKEN }function isNotFoundError(err) {const msg = err?.message?.toLowerCase() ?? ''return (9 unmodified linesasync () => {let responsetry {response = await downloadFile({ repo, path: remotePath, credentials })} catch (err) {if (isNotFoundError(err)) return nullthrow err16 unmodified linesrepo,credentials,files: [{ path: remotePath, content: blob }],})},{ attempts: 3, label: `writeJSON:${remotePath}` }8 unmodified linesrepo,credentials,files: [{ path: remotePath, content: blob }],})},{ attempts: 3, label: `uploadBinary:${remotePath}` }5 unmodified linesasync () => {let responsetry {response = await downloadFile({ repo, path: remotePath, credentials })} catch (err) {if (isNotFoundError(err)) return nullthrow err7 unmodified linesexport async function fileExists(remotePath) {try {const response = await downloadFile({ repo, path: remotePath, credentials })return response !== null} catch (err) {if (isNotFoundError(err)) return false6 unmodified lines789101112131415161718192021222324252627289 unmodified lines3839404142434416 unmodified lines616263646566678 unmodified lines767778798081825 unmodified lines888990919293947 unmodified lines1021031041051061071086 unmodified linesif (!HF_TOKEN) throw new Error('Missing required environment variable: HF_TOKEN')if (!HF_BUCKET_NAME) throw new Error('Missing required environment variable: HF_BUCKET_NAME')const repo = { type: 'bucket', name: HF_BUCKET_NAME }const credentials = { accessToken: HF_TOKEN }async function fetchWithTimeout(url, options, ms = 30000) {const controller = new AbortController()const timer = setTimeout(() => controller.abort(), ms)try {return await fetch(url, {...options,signal: controller.signal})} finally {clearTimeout(timer)}}function isNotFoundError(err) {const msg = err?.message?.toLowerCase() ?? ''return (9 unmodified linesasync () => {let responsetry {response = await downloadFile({ repo, path: remotePath, credentials, fetch: fetchWithTimeout })} catch (err) {if (isNotFoundError(err)) return nullthrow err16 unmodified linesrepo,credentials,files: [{ path: remotePath, content: blob }],fetch: fetchWithTimeout,})},{ attempts: 3, label: `writeJSON:${remotePath}` }8 unmodified linesrepo,credentials,files: [{ path: remotePath, content: blob }],fetch: fetchWithTimeout,})},{ attempts: 3, label: `uploadBinary:${remotePath}` }5 unmodified linesasync () => {let responsetry {response = await downloadFile({ repo, path: remotePath, credentials, fetch: fetchWithTimeout })} catch (err) {if (isNotFoundError(err)) return nullthrow err7 unmodified linesexport async function fileExists(remotePath) {try {const response = await downloadFile({ repo, path: remotePath, credentials, fetch: fetchWithTimeout })return response !== null} catch (err) {if (isNotFoundError(err)) return false
123456710 unmodified lines18192021222324const DEFAULT_ATTEMPTS = 3const DEFAULT_DELAY_MS = 1000const DEFAULT_LABEL = 'operation'export async function retry(fn, options = {}) {const attempts = options.attempts ?? DEFAULT_ATTEMPTSconst delayMs = options.delayMs ?? DEFAULT_DELAY_MS10 unmodified linesconsole.warn(`[retry] ${label} attempt ${attempt}/${attempts} failed: ${err.message}`)if (attempt < attempts) {await new Promise((resolve) => setTimeout(resolve, currentDelay))currentDelay *= 2}}123456789101112131410 unmodified lines2526272829303132333435363738const DEFAULT_ATTEMPTS = 5const DEFAULT_DELAY_MS = 2000const DEFAULT_LABEL = 'operation'const NETWORK_ERROR_KEYWORDS = ['ECONNRESET', 'TLS', 'socket', 'ETIMEDOUT', 'aborted']function isNetworkError(err) {const msg = err?.message ?? ''return NETWORK_ERROR_KEYWORDS.some((keyword) => msg.includes(keyword))}export async function retry(fn, options = {}) {const attempts = options.attempts ?? DEFAULT_ATTEMPTSconst delayMs = options.delayMs ?? DEFAULT_DELAY_MS10 unmodified linesconsole.warn(`[retry] ${label} attempt ${attempt}/${attempts} failed: ${err.message}`)if (attempt < attempts) {let waitMs = currentDelayif (isNetworkError(err)) {console.warn('[retry] Network error detected, adding extra delay')waitMs += 3000}await new Promise((resolve) => setTimeout(resolve, waitMs))currentDelay *= 2}}
src/commands/leave-background.jsAdded+106
src/commands/leave-message.jsAdded+72
src/commands/preview.jsAdded+66
src/commands/reset.jsAdded+56
src/commands/setup.js+10-9
src/commands/welcome-background.jsAdded+111
src/commands/welcome-message.jsAdded+101
src/storage/hfClient.js+18-4
src/utils/retry.js+17-3