parent
							
								
									6578eb487e
								
							
						
					
					
						commit
						4a2657f928
					
				
					 1 changed files with 0 additions and 14 deletions
				
			
		|  | @ -25,10 +25,6 @@ import definePlugin, { OptionType } from "@utils/types"; | ||||||
| const EMOTE = "<:luna:1035316192220553236>"; | const EMOTE = "<:luna:1035316192220553236>"; | ||||||
| const DATA_KEY = "MessageTags_TAGS"; | const DATA_KEY = "MessageTags_TAGS"; | ||||||
| const MessageTagsMarker = Symbol("MessageTags"); | const MessageTagsMarker = Symbol("MessageTags"); | ||||||
| const author = { |  | ||||||
|     id: "821472922140803112", |  | ||||||
|     bot: false |  | ||||||
| }; |  | ||||||
| 
 | 
 | ||||||
| interface Tag { | interface Tag { | ||||||
|     name: string; |     name: string; | ||||||
|  | @ -59,14 +55,12 @@ function createTagCommand(tag: Tag) { | ||||||
|         execute: async (_, ctx) => { |         execute: async (_, ctx) => { | ||||||
|             if (!await getTag(tag.name)) { |             if (!await getTag(tag.name)) { | ||||||
|                 sendBotMessage(ctx.channel.id, { |                 sendBotMessage(ctx.channel.id, { | ||||||
|                     author, |  | ||||||
|                     content: `${EMOTE} The tag **${tag.name}** does not exist anymore! Please reload ur Discord to fix :)` |                     content: `${EMOTE} The tag **${tag.name}** does not exist anymore! Please reload ur Discord to fix :)` | ||||||
|                 }); |                 }); | ||||||
|                 return { content: `/${tag.name}` }; |                 return { content: `/${tag.name}` }; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (Settings.plugins.MessageTags.clyde) sendBotMessage(ctx.channel.id, { |             if (Settings.plugins.MessageTags.clyde) sendBotMessage(ctx.channel.id, { | ||||||
|                 author, |  | ||||||
|                 content: `${EMOTE} The tag **${tag.name}** has been sent!` |                 content: `${EMOTE} The tag **${tag.name}** has been sent!` | ||||||
|             }); |             }); | ||||||
|             return { content: tag.message.replaceAll("\\n", "\n") }; |             return { content: tag.message.replaceAll("\\n", "\n") }; | ||||||
|  | @ -162,7 +156,6 @@ export default definePlugin({ | ||||||
| 
 | 
 | ||||||
|                         if (await getTag(name)) |                         if (await getTag(name)) | ||||||
|                             return sendBotMessage(ctx.channel.id, { |                             return sendBotMessage(ctx.channel.id, { | ||||||
|                                 author, |  | ||||||
|                                 content: `${EMOTE} A Tag with the name **${name}** already exists!` |                                 content: `${EMOTE} A Tag with the name **${name}** already exists!` | ||||||
|                             }); |                             }); | ||||||
| 
 | 
 | ||||||
|  | @ -176,7 +169,6 @@ export default definePlugin({ | ||||||
|                         await addTag(tag); |                         await addTag(tag); | ||||||
| 
 | 
 | ||||||
|                         sendBotMessage(ctx.channel.id, { |                         sendBotMessage(ctx.channel.id, { | ||||||
|                             author, |  | ||||||
|                             content: `${EMOTE} Successfully created the tag **${name}**!` |                             content: `${EMOTE} Successfully created the tag **${name}**!` | ||||||
|                         }); |                         }); | ||||||
|                         break; // end 'create'
 |                         break; // end 'create'
 | ||||||
|  | @ -186,7 +178,6 @@ export default definePlugin({ | ||||||
| 
 | 
 | ||||||
|                         if (!await getTag(name)) |                         if (!await getTag(name)) | ||||||
|                             return sendBotMessage(ctx.channel.id, { |                             return sendBotMessage(ctx.channel.id, { | ||||||
|                                 author, |  | ||||||
|                                 content: `${EMOTE} A Tag with the name **${name}** does not exist!` |                                 content: `${EMOTE} A Tag with the name **${name}** does not exist!` | ||||||
|                             }); |                             }); | ||||||
| 
 | 
 | ||||||
|  | @ -194,14 +185,12 @@ export default definePlugin({ | ||||||
|                         await removeTag(name); |                         await removeTag(name); | ||||||
| 
 | 
 | ||||||
|                         sendBotMessage(ctx.channel.id, { |                         sendBotMessage(ctx.channel.id, { | ||||||
|                             author, |  | ||||||
|                             content: `${EMOTE} Successfully deleted the tag **${name}**!` |                             content: `${EMOTE} Successfully deleted the tag **${name}**!` | ||||||
|                         }); |                         }); | ||||||
|                         break; // end 'delete'
 |                         break; // end 'delete'
 | ||||||
|                     } |                     } | ||||||
|                     case "list": { |                     case "list": { | ||||||
|                         sendBotMessage(ctx.channel.id, { |                         sendBotMessage(ctx.channel.id, { | ||||||
|                             author, |  | ||||||
|                             embeds: [ |                             embeds: [ | ||||||
|                                 { |                                 { | ||||||
|                                     // @ts-ignore
 |                                     // @ts-ignore
 | ||||||
|  | @ -224,12 +213,10 @@ export default definePlugin({ | ||||||
| 
 | 
 | ||||||
|                         if (!tag) |                         if (!tag) | ||||||
|                             return sendBotMessage(ctx.channel.id, { |                             return sendBotMessage(ctx.channel.id, { | ||||||
|                                 author, |  | ||||||
|                                 content: `${EMOTE} A Tag with the name **${name}** does not exist!` |                                 content: `${EMOTE} A Tag with the name **${name}** does not exist!` | ||||||
|                             }); |                             }); | ||||||
| 
 | 
 | ||||||
|                         sendBotMessage(ctx.channel.id, { |                         sendBotMessage(ctx.channel.id, { | ||||||
|                             author, |  | ||||||
|                             content: tag.message.replaceAll("\\n", "\n") |                             content: tag.message.replaceAll("\\n", "\n") | ||||||
|                         }); |                         }); | ||||||
|                         break; // end 'preview'
 |                         break; // end 'preview'
 | ||||||
|  | @ -237,7 +224,6 @@ export default definePlugin({ | ||||||
| 
 | 
 | ||||||
|                     default: { |                     default: { | ||||||
|                         sendBotMessage(ctx.channel.id, { |                         sendBotMessage(ctx.channel.id, { | ||||||
|                             author, |  | ||||||
|                             content: "Invalid sub-command" |                             content: "Invalid sub-command" | ||||||
|                         }); |                         }); | ||||||
|                         break; |                         break; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue