-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathembeds.js
More file actions
129 lines (107 loc) · 3.37 KB
/
embeds.js
File metadata and controls
129 lines (107 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
const { EmbedBuilder, Colors } = require('discord.js');
const permissionErrorEmbed = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ You do not have permission to use this command!');
const errorEmbed = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ An error occured!');
const emptyMessage = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ No text to quote!');
const diffServerError = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ You can only quote messages from this server!');
const noCommandEmbed = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ This command does not exist!');
const quoteError = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ Error saving embed');
const noQuoteError = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ There are no saved quotes!');
const notYourList = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ You didn\'t send this command, please use /listall');
const delConfirmation = new EmbedBuilder()
.setColor(Colors.Orange)
.setTitle('⚠️ To delete all quotes, please press confirm');
const delConfirmed = new EmbedBuilder()
.setColor(Colors.Green)
.setTitle('✅ All quotes deleted!');
const delCancelled = new EmbedBuilder()
.setColor(Colors.Orange)
.setTitle('✅ Deletion cancelled');
const delTimeOut = new EmbedBuilder()
.setColor(Colors.DarkOrange)
.setTitle('⚠️ Confirmation timed out');
const invalidQuoteId = new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('⚠️ Invalid Quote ID');
const exportSuccess = new EmbedBuilder()
.setColor(Colors.Green)
.setTitle('Exported quotes as CSV')
.setDescription('A CSV file with all quotes is attached above!');
const multiQuoteFind = (wordToFind, formattedQuotesList) => new EmbedBuilder()
.setColor(Colors.Green)
.setTitle(`:mag_right: Quotes containing "${wordToFind}"`)
.setDescription(formattedQuotesList);
function noQuoteWordError(word) {
return new EmbedBuilder()
.setColor(Colors.Red)
.setTitle(`⚠️ No quotes found containing "${word}"`);
}
function oneQuoteSuccess(content, author, count) {
return new EmbedBuilder()
.setColor(Colors.Green)
.setTitle('✅ Quote Saved')
.setDescription(`"${content}" - ${author}`)
.setFooter({ text: `Quote #${count}` });
}
function oneQuoteFind(content, author, count) {
return new EmbedBuilder()
.setColor(Colors.Green)
.setTitle(`:mag_right: Quote #${count + 1}`)
.setDescription(`"${content}" - ${author}`);
}
function oneDelete(quoteid, content, author) {
return new EmbedBuilder()
.setColor(Colors.Green)
.setTitle(`✅ Quote #${quoteid + 1} deleted!`)
.setDescription(`"${content}" - ${author}`);
}
function allQuotesAuthor(author, formattedQuotes) {
return new EmbedBuilder()
.setColor(Colors.Green)
.setTitle(`Quotes by ${author}`)
.setDescription(formattedQuotes);
}
function quoteAuthorNotFound(author) {
return new EmbedBuilder()
.setColor(Colors.Red)
.setTitle(`Quotes by ${author}`)
.setDescription('No quotes found by this author!');
}
module.exports = {
permissionErrorEmbed,
errorEmbed,
emptyMessage,
diffServerError,
noCommandEmbed,
quoteError,
noQuoteError,
notYourList,
delConfirmation,
delConfirmed,
delCancelled,
delTimeOut,
invalidQuoteId,
exportSuccess,
multiQuoteFind,
noQuoteWordError,
oneQuoteSuccess,
oneQuoteFind,
allQuotesAuthor,
quoteAuthorNotFound,
oneDelete,
};