Jump to content
  • Sign Up
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.

  • Winner 1

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 an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...