diff options
author | TymanWasTaken <tyman@tyman.tech> | 2021-05-27 15:31:50 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 15:31:50 -0600 |
commit | 795a773462df83969783496f29fed969a53c66ab (patch) | |
tree | aca162312ca241084a3c839f227f383effc248f3 /src/commands | |
parent | 2d9e9c34b93bb1ca8140df5990e1b159ec82db27 (diff) | |
download | tanzanite-795a773462df83969783496f29fed969a53c66ab.tar.gz tanzanite-795a773462df83969783496f29fed969a53c66ab.tar.bz2 tanzanite-795a773462df83969783496f29fed969a53c66ab.zip |
fix probably idk
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/server-config/prefix.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/commands/server-config/prefix.ts b/src/commands/server-config/prefix.ts index cf70bd2..661284f 100644 --- a/src/commands/server-config/prefix.ts +++ b/src/commands/server-config/prefix.ts @@ -33,8 +33,13 @@ export default class PrefixCommand extends BushCommand { } async changePrefix(guild: DiscordGuild, prefix?: string): Promise<void> { + let row = await Guild.findByPk(guild.id); + if (!row) { + row = Guild.build({ + id: guild.id + }) + } if (prefix) { - const row = await Guild.findByPk(guild.id); row.prefix = prefix; await row.save(); } else { |