Using Arguments to Post Invites on Discord

Now I understand the concept of arguments, variables, conditions etc etc etc

Unfortunately I am failing to understand how to add a command for my clan to use on our discord through nightbot.

What it should look like (or close to it)(without the spaces in the *, : and `…had to add cus of text formatting on this forum)::

User types: #tourney-8-Monday-9p-John-Winners
Output: Nightbot: ***Please use the :thumbsup : below to check in! ***
` ``Tier 8 - Monday - 9p EST
Leader: John
Team: Winners ```

I read that commands can’t have spaces in them…but if the hyphens can be taken out and the command can be typed by users using just spaces between each variable…that would be cool.

So what I have tried using so far to achieve this through the nightbot custom commands dashboard looked like this (without the spaces in the *, : and `…had to add cus of text formatting on this forum):

Command: #tourney-$(1)-$(2)-$(3)-$(4)-$(5)
Message: ** *Please use the :thumbsup : below to check in! ***
` ``Tier $(1) - $(2) - $(3) EST
Leader: $(4)
Team: $(5)```

But after looking further into forum posts…I realized I needed to add a custom command through chat itself using a specific format of coding.

This is where I get stuck since I have yet to invest the time into learning coding. Would someone be able to help me out? I am trying to manage over 100+ people on our discord for the game we play and this would help people be able to post tourney invites with ease.

My thanks in advance.

Note: I also realized forcing text into new lines (like pressing shift+enter) doesn’t quite work when I want nightbot to output text with specific formatting. Everything in the message box gets saved as one full line. I have sort of just :man_shrugging: shrugged that one off. Any way to overcome this without the use of ``` formatting and whatnot?

Hiya! Commands itself can’t have spaces in them, however the arguments after the command can. So for your example you can create a command !tourney, you can copy paste this directly in your Discord:

!commands add !tourney ***Please use the :thumbsup: below to check in! ***```Tier $(1) - $(2) - $(3) EST``````Leader: $(4)``````Team: $(5)```

Since new lines/enters are not supported you can use the triple grave accents to do a new line for the leader, team etc.

Now you can use the command like:
!tourney 8 monday 9pm john winners

which results in:

Ofcourse you can replace !tourney with #tourney or whatever you like, if this is not what you meant let me know.

I’m about to boot discord back up and check that.

I wanted to say thanks for the quick reply my dude o7 (It’s a salute in the games I play. I say it in chat as a sign of respect )

I notice nightbot outputted each line with the box formatting, is that a limitation to the command? (meaning instead of a one whole box for all the lines)…EDIT: wait…nvm, i notice what you put in the custom command between each query. It looks intentional to force the new line of text…

Np, exactly, that’s the only way (that I know off) to force new lines in Discord.

Well perfect!

This is exactly what I was looking for. I hope this post will help anyone else in need of a similar system. It also looked like I was on the right track, just wasn’t going about it correctly.

My thanks again my dude. Have a good one o7

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.