Skip to content

Commit d951d53

Browse files
committed
Use static help strings for slowmode and kick
1 parent be87daa commit d951d53

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

src/api.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,10 @@ pub(crate) fn slow_mode(args: Args) -> Result<()> {
7676
}
7777

7878
pub(crate) fn slow_mode_help(args: Args) -> Result<()> {
79-
let help_string = format!(
80-
"
79+
let help_string = "
8180
Set slowmode on a channel
8281
```
83-
{command}
82+
?slowmode {channel} {seconds}
8483
```
8584
**Example:**
8685
```
@@ -92,10 +91,7 @@ will set slowmode on the `#bot-usage` channel with a delay of 10 seconds.
9291
```
9392
?slowmode #bot-usage 0
9493
```
95-
will disable slowmode on the `#bot-usage` channel.
96-
",
97-
command = "?slowmode {channel} {seconds}",
98-
);
94+
will disable slowmode on the `#bot-usage` channel.";
9995
send_reply(&args, &help_string)?;
10096
Ok(())
10197
}
@@ -122,21 +118,16 @@ pub(crate) fn kick(args: Args) -> Result<()> {
122118
}
123119

124120
pub(crate) fn kick_help(args: Args) -> Result<()> {
125-
let help_string = format!(
126-
"
121+
let help_string = "
127122
Kick a user from the guild
128123
```
129-
{command}
124+
?kick {user}
130125
```
131126
**Example:**
132127
```
133128
?kick @someuser
134129
```
135-
will kick a user from the guild.
136-
",
137-
command = "?kick {user}"
138-
);
139-
130+
will kick a user from the guild.";
140131
send_reply(&args, &help_string)?;
141132
Ok(())
142133
}

0 commit comments

Comments
 (0)