Skip to content

Commit b127cc5

Browse files
committed
remove carriage returns from wiki, fix details formatting for company
1 parent ec24fb7 commit b127cc5

File tree

3 files changed

+39
-36
lines changed

3 files changed

+39
-36
lines changed

docs/COMMAND-WIKI.md

+34-34
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## ban
33
- **Aliases:** None
44
- **Description:** Ban a user.
5-
- **Examples:**<br> `.ban @jeff spam`
5+
- **Examples:**<br> `.ban @jeff spam`
66
- **Options:**
77
- ``user``: The user to ban.
88
- ``reason``: The reason why we are banning the user.
@@ -12,14 +12,14 @@
1212
## coin
1313
- **Aliases:** None
1414
- **Description:** Handle coin functions.
15-
- **Examples:**<br>`.coin adjust @Codey 100`<br>`.coin adjust @Codey -100 Codey broke.`<br>`.coin`<br>`.coin check @Codey`<br>`.coin c @Codey`<br>`.coin info`<br>`.coin i`<br>`.coin update @Codey 100`<br>`.coin update @Codey 0 Reset Codey's balance.`<br>`.coin transfer @Codey 10`<br>`.coin transfer @Codey 15 Lost a bet to Codey `
15+
- **Examples:**<br>`.coin adjust @Codey 100`<br>`.coin adjust @Codey -100 Codey broke.`<br>`.coin`<br>`.coin check @Codey`<br>`.coin c @Codey`<br>`.coin info`<br>`.coin i`<br>`.coin update @Codey 100`<br>`.coin update @Codey 0 Reset Codey's balance.`<br>`.coin transfer @Codey 10`<br>`.coin transfer @Codey 15 Lost a bet to Codey `
1616
- **Options:** None
1717
- **Subcommands:** `adjust`, `check`, `info`, `update`, `leaderboard`, `transfer`
1818

1919
## coin adjust
2020
- **Aliases:** `a`
2121
- **Description:** Adjust the coin balance of a user.
22-
- **Examples:**<br>`.coin adjust @Codey 100`<br>`.coin adjust @Codey -100 Codey broke.`
22+
- **Examples:**<br>`.coin adjust @Codey 100`<br>`.coin adjust @Codey -100 Codey broke.`
2323
- **Options:**
2424
- ``user``: The user to adjust the balance of.
2525
- ``amount``: The amount to adjust the balance of the specified user by.
@@ -29,29 +29,29 @@
2929
## coin check
3030
- **Aliases:** `c`, `b`, `balance`, `bal`
3131
- **Description:** The user to check the balance of.
32-
- **Examples:**<br>`.coin check @Codey`<br>`.coin c @Codey`
32+
- **Examples:**<br>`.coin check @Codey`<br>`.coin c @Codey`
3333
- **Options:**
3434
- ``user``: The user to check the balance of.
3535
- **Subcommands:** None
3636

3737
## coin info
3838
- **Aliases:** `information`, `i`
3939
- **Description:** Get info about Codey coin.
40-
- **Examples:**<br>`.coin info`<br>`.coin information`<br>`.coin i`
40+
- **Examples:**<br>`.coin info`<br>`.coin information`<br>`.coin i`
4141
- **Options:** None
4242
- **Subcommands:** None
4343

4444
## coin leaderboard
4545
- **Aliases:** `lb`
4646
- **Description:** Get the current coin leaderboard.
47-
- **Examples:**<br>`.coin lb`<br>`.coin leaderboard`
47+
- **Examples:**<br>`.coin lb`<br>`.coin leaderboard`
4848
- **Options:** None
4949
- **Subcommands:** None
5050

5151
## coin transfer
5252
- **Aliases:** `t`
5353
- **Description:** Transfer coins from your balance to another user.
54-
- **Examples:**<br> `.coin transfer @Codey 10`<br> `.coin transfer @Codey 10 Lost a bet to @Codey`
54+
- **Examples:**<br> `.coin transfer @Codey 10`<br> `.coin transfer @Codey 10 Lost a bet to @Codey`
5555
- **Options:**
5656
- ``user``: The user to transfer coins to.
5757
- ``amount``: The amount to transfer to the specified user.
@@ -61,7 +61,7 @@
6161
## coin update
6262
- **Aliases:** `u`
6363
- **Description:** Update the coin balance of a user.
64-
- **Examples:**<br> `.coin update @Codey 100`
64+
- **Examples:**<br> `.coin update @Codey 100`
6565
- **Options:**
6666
- ``user``: The user to update the balance of.
6767
- ``amount``: The amount to update the balance of the specified user to.
@@ -72,42 +72,42 @@
7272
## company
7373
- **Aliases:** None
7474
- **Description:** None
75-
- **Examples:**<br>`.company add coinbase SRE`<br>`.company find coinbase`<br>
75+
- **Examples:**<br>`.company add coinbase SRE`<br>`.company find coinbase`
7676
- **Options:** None
7777
- **Subcommands:** `enroll`, `add`, `remove`, `find`, `profile`
7878

7979
## company add
8080
- **Aliases:** `a`
8181
- **Description:** Add a company to your profile
82-
- **Examples:**<br> `.company add https://www.crunchbase.com/organization/microsoft`<br> `.company a microsoft `
82+
- **Examples:**<br> `.company add https://www.crunchbase.com/organization/microsoft`<br> `.company a microsoft `
8383
- **Options:**
8484
- **Subcommands:** None
8585

8686
## company enroll
8787
- **Aliases:** `e`
8888
- **Description:** None
89-
- **Examples:**<br> `.company enroll https://www.crunchbase.com/organization/microsoft`<br> `.company enroll microsoft`
89+
- **Examples:**<br> `.company enroll https://www.crunchbase.com/organization/microsoft`<br> `.company enroll microsoft`
9090
- **Options:**
9191
- **Subcommands:** None
9292

9393
## company find
9494
- **Aliases:** `f`
9595
- **Description:** Find all individuals that work at the company.
96-
- **Examples:**<br> `.company find https://www.crunchbase.com/organization/microsoft`<br> `.company f microsoft`
96+
- **Examples:**<br> `.company find https://www.crunchbase.com/organization/microsoft`<br> `.company f microsoft`
9797
- **Options:**
9898
- **Subcommands:** None
9999

100100
## company profile
101101
- **Aliases:** `p`
102102
- **Description:** List all the companies you are associated with
103-
- **Examples:**<br> `.company profile`<br> `.company p`
103+
- **Examples:**<br> `.company profile`<br> `.company p`
104104
- **Options:** None
105105
- **Subcommands:** None
106106

107107
## company remove
108108
- **Aliases:** `r`
109109
- **Description:** Remove a company to your profile
110-
- **Examples:**<br> `.company remove https://www.crunchbase.com/organization/microsoft`<br> `.company r microsoft `
110+
- **Examples:**<br> `.company remove https://www.crunchbase.com/organization/microsoft`<br> `.company r microsoft `
111111
- **Options:**
112112
- **Subcommands:** None
113113

@@ -122,7 +122,7 @@
122122
## rolldice
123123
- **Aliases:** `rd`, `roll`, `roll-dice`, `dice-roll`, `diceroll`, `dice`
124124
- **Description:** Roll a dice! :game_die:
125-
- **Examples:**<br> `.roll-dice 6`<br> `.dice-roll 30`<br> `.roll 100`<br> `.rd 4`<br> `.diceroll 2`<br> `.dice 1`<br> `.rolldice 10`
125+
- **Examples:**<br> `.roll-dice 6`<br> `.dice-roll 30`<br> `.roll 100`<br> `.rd 4`<br> `.diceroll 2`<br> `.dice 1`<br> `.rolldice 10`
126126
- **Options:**
127127
- ``sides``: The number of sides on the die.
128128
- **Subcommands:** None
@@ -131,15 +131,15 @@
131131
## bj
132132
- **Aliases:** `blj`, `blackjack`, `21`
133133
- **Description:** Play a Blackjack game to win some Codey coins!
134-
- **Examples:**<br>`.bj 100`<br>`.blj 100`
134+
- **Examples:**<br>`.bj 100`<br>`.blj 100`
135135
- **Options:**
136136
- ``bet``: A valid bet amount
137137
- **Subcommands:** None
138138

139139
## connect4
140140
- **Aliases:** None
141141
- **Description:** Play Connect 4!
142-
- **Examples:**<br>`.connect4`<br>`.connect 4 @user`
142+
- **Examples:**<br>`.connect4`<br>`.connect 4 @user`
143143
- **Options:** None
144144
- **Subcommands:** None
145145

@@ -155,58 +155,58 @@
155155
## interviewers
156156
- **Aliases:** `int`, `interviewer`
157157
- **Description:** Handle interviewer functions.
158-
- **Examples:**<br>`.interviewer`<br>`.interviewer frontend`
158+
- **Examples:**<br>`.interviewer`<br>`.interviewer frontend`
159159
- **Options:** None
160160
- **Subcommands:** `clear`, `domain`, `pause`, `profile`, `resume`, `signup`, `list`
161161

162162
## interviewer clear
163163
- **Aliases:** `clr`
164164
- **Description:** Clear all your interviewer data
165-
- **Examples:**<br>`.interviewer clear`
165+
- **Examples:**<br>`.interviewer clear`
166166
- **Options:** None
167167
- **Subcommands:** None
168168

169169
## interviewer domain
170170
- **Aliases:** `domain`
171171
- **Description:** Add/remove a domain of your choice
172-
- **Examples:**<br>`.interviewer domain frontend`
172+
- **Examples:**<br>`.interviewer domain frontend`
173173
- **Options:**
174174
- ``domain_name``: A valid domain name
175175
- **Subcommands:** None
176176

177177
## interviewer list
178178
- **Aliases:** `ls`
179179
- **Description:** List all interviewers or those under a specific domain
180-
- **Examples:**<br>`.interviewer list`<br>`.interviewer list backend`
180+
- **Examples:**<br>`.interviewer list`<br>`.interviewer list backend`
181181
- **Options:**
182182
- ``domain``: The domain to be examined
183183
- **Subcommands:** None
184184

185185
## interviewer pause
186186
- **Aliases:** `ps`
187187
- **Description:** Put your interviewer profile on pause
188-
- **Examples:**<br>`.interviewer pause`
188+
- **Examples:**<br>`.interviewer pause`
189189
- **Options:** None
190190
- **Subcommands:** None
191191

192192
## interviewer profile
193193
- **Aliases:** `pf`
194194
- **Description:** Display your interviewer profile data
195-
- **Examples:**<br>`.interviewer profile`
195+
- **Examples:**<br>`.interviewer profile`
196196
- **Options:** None
197197
- **Subcommands:** None
198198

199199
## interviewer resume
200200
- **Aliases:** `resume`
201201
- **Description:** Resume your interviewer profile
202-
- **Examples:**<br>`.interviewer resume`
202+
- **Examples:**<br>`.interviewer resume`
203203
- **Options:** None
204204
- **Subcommands:** None
205205

206206
## interviewer signup
207207
- **Aliases:** `signup`
208208
- **Description:** Sign yourself up to be an interviewer!
209-
- **Examples:**<br>`.interviewer signup www.calendly.com`
209+
- **Examples:**<br>`.interviewer signup www.calendly.com`
210210
- **Options:**
211211
- ``calendar_url``: A valid calendly.com or x.ai calendar link
212212
- **Subcommands:** None
@@ -222,15 +222,15 @@
222222
## leetcode random
223223
- **Aliases:** `r`
224224
- **Description:** Get a random LeetCode problem.
225-
- **Examples:**<br>`.leetcode`n<br>`.leetcode random`
225+
- **Examples:**<br>`.leetcode`n<br>`.leetcode random`
226226
- **Options:**
227227
- ``difficulty``: The difficulty of the problem.
228228
- **Subcommands:** None
229229

230230
## leetcode specific
231231
- **Aliases:** `spec`, `s`
232232
- **Description:** Get a LeetCode problem with specified problem ID.
233-
- **Examples:**<br>`.leetcode specific 1`
233+
- **Examples:**<br>`.leetcode specific 1`
234234
- **Options:**
235235
- ``problem-id``: The problem ID.
236236
- **Subcommands:** None
@@ -239,21 +239,21 @@
239239
## help
240240
- **Aliases:** `wiki`
241241
- **Description:** Get the URL to the wiki page.
242-
- **Examples:**<br>`.help`<br>`.wiki`
242+
- **Examples:**<br>`.help`<br>`.wiki`
243243
- **Options:** None
244244
- **Subcommands:** None
245245

246246
## info
247247
- **Aliases:** None
248248
- **Description:** Get Codey information - app version, repository link and issue templates.
249-
- **Examples:**<br> `.info`
249+
- **Examples:**<br> `.info`
250250
- **Options:** None
251251
- **Subcommands:** None
252252

253253
## member
254254
- **Aliases:** None
255255
- **Description:** Get CSC membership information of a user.
256-
- **Examples:**<br>`.member [id]`
256+
- **Examples:**<br>`.member [id]`
257257
- **Options:**
258258
- ``uwid``: The Quest ID of the user.
259259
- **Subcommands:** None
@@ -276,29 +276,29 @@
276276
## profile
277277
- **Aliases:** `userprofile`, `aboutme`
278278
- **Description:** Handle user profile functions.
279-
- **Examples:**<br> `.profile @Codey`
279+
- **Examples:**<br> `.profile @Codey`
280280
- **Options:** None
281281
- **Subcommands:** `about`, `grad`, `set`
282282

283283
## profile about
284284
- **Aliases:** `a`
285285
- **Description:** Display user profile.
286-
- **Examples:**<br> `.profile about @Codey`<br> `.profile a @Codey`
286+
- **Examples:**<br> `.profile about @Codey`<br> `.profile a @Codey`
287287
- **Options:**
288288
- ``user``: The user to give profile of.
289289
- **Subcommands:** None
290290

291291
## profile grad
292292
- **Aliases:** `g`
293293
- **Description:** Update Grad Roles.
294-
- **Examples:**<br> `.profile grad`<br> `.profile g`
294+
- **Examples:**<br> `.profile grad`<br> `.profile g`
295295
- **Options:** None
296296
- **Subcommands:** None
297297

298298
## profile set
299299
- **Aliases:** `s`
300300
- **Description:** Set parameters of user profile.
301-
- **Examples:**<br> `.profile set @Codey`<br> `.profile a @Codey`
301+
- **Examples:**<br> `.profile set @Codey`<br> `.profile a @Codey`
302302
- **Options:**
303303
- ``customization``: The customization to be set for the user.
304304
- ``description``: The description of the customization to be set for the user.

src/commands/company/company.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ const companyCommandDetails: CodeyCommandDetails = {
1313
'Add yourself to a database of internships/jobs, or look for individuals that have worked at a job .',
1414
detailedDescription: `**Examples:**
1515
\`${container.botPrefix}company add coinbase SRE\`
16-
\`${container.botPrefix}company find coinbase\`
17-
`,
16+
\`${container.botPrefix}company find coinbase\``,
1817
options: [],
1918
subcommandDetails: {
2019
enroll: companyEnrollCommandDetails,

src/utils/updateWiki.ts

+4
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ export const updateWiki = async (): Promise<void> => {
225225
}
226226
}
227227
}
228+
// Remove any carriage returns
229+
const data = await readFile(wikiPath, 'utf-8');
230+
const modifiedData = data.replace(/\r/g, '');
231+
await writeFile(wikiPath, modifiedData);
228232
}
229233

230234
// Harcoding info for suggestion until it can be migrated to CodeyCommand framework

0 commit comments

Comments
 (0)