mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 15:35:11 +00:00
fix me being silly with messagetags
This commit is contained in:
parent
567127ff45
commit
6166a8ef17
1 changed files with 11 additions and 18 deletions
|
@ -64,17 +64,16 @@ function createTagCommand(tag: Tag) {
|
||||||
|
|
||||||
|
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
|
clyde: {
|
||||||
|
description: "If enabled, clyde will send you an ephemeral message when a tag was used.",
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
data: {
|
data: {
|
||||||
type: OptionType.ARRAY,
|
type: OptionType.ARRAY,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
description: ""
|
description: ""
|
||||||
},
|
},
|
||||||
migrated: {
|
|
||||||
type: OptionType.BOOLEAN,
|
|
||||||
description: "",
|
|
||||||
default: false,
|
|
||||||
hidden: true
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,22 +81,16 @@ export default definePlugin({
|
||||||
name: "MessageTags",
|
name: "MessageTags",
|
||||||
description: "Allows you to save messages and to use them with a simple command.",
|
description: "Allows you to save messages and to use them with a simple command.",
|
||||||
authors: [Devs.Luna],
|
authors: [Devs.Luna],
|
||||||
options: {
|
|
||||||
clyde: {
|
|
||||||
name: "Clyde message on send",
|
|
||||||
description: "If enabled, clyde will send you an ephemeral message when a tag was used.",
|
|
||||||
type: OptionType.BOOLEAN,
|
|
||||||
default: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
settings,
|
settings,
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
if (!settings.store.migrated) {
|
const data = await DataStore.get(DATA_KEY);
|
||||||
const data = await DataStore.get(DATA_KEY);
|
|
||||||
if (data !== undefined) settings.store.data = data;
|
if (data != null) {
|
||||||
settings.store.migrated = true;
|
settings.store.data = data;
|
||||||
|
await DataStore.del(DATA_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const tag of settings.store.data) createTagCommand(tag);
|
for (const tag of settings.store.data) createTagCommand(tag);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue