Jump to content
  • Sign Up

Archived

This topic is now archived and is closed to further replies.

SuperZPMax

How can i create a /discord command?

Recommended Posts

Hello! I found out that people were adding /discord commands to their servers. like NA2. And i was wondering, how could i create a one? Is it possible by using the built-in commands? (MCGalaxy commands) or is it a plugin? I just wanna know if its a plugin or i can create it with commands.

Share this post


Link to post

For simple commands that just display text, you can do this without any special code.
1. add a text file in "extra/text" folder such as discord.txt
2. add the discord link in discord.txt
3. go to text/aliases.txt and add "discord:view discord" on a new line.
4. restart the server or use /server reload
Now when a user writes /discord, it will call /view discord and display the contents of the file.

Share this post


Link to post
21 minutes ago, Goodly said:

For simple commands that just display text, you can do this without any special code.
1. add a text file in "extra/text" folder such as discord.txt
2. add the discord link in discord.txt
3. go to text/aliases.txt and add "discord:view discord" on a new line.
4. restart the server or use /server reload
Now when a user writes /discord, it will call /view discord and display the contents of the file.

Thank you for sharing the steps, but it doesnt work. The thing it returns in chat is "File specified doesnt exist", then i decided to keep the discord.txt in extras folder and text folder. Doesnt work. (the discord:view discord is in aliases.txt)

24 minutes ago, Goodly said:

For simple commands that just display text, you can do this without any special code.
1. add a text file in "extra/text" folder such as discord.txt
2. add the discord link in discord.txt
3. go to text/aliases.txt and add "discord:view discord" on a new line.
4. restart the server or use /server reload
Now when a user writes /discord, it will call /view discord and display the contents of the file.

Im sorry for what i send. It is working. I thought you mean to put it in text or extras folder, i didnt notice the "text" folder inside extras. It works. Thank you!

Share this post


Link to post

Yeah, the "extra/text" folder location is confusing. It should probably be inside of the text folder and be called "viewable" or something.

Share this post


Link to post

×
×
  • Create New...