We now use Steam to access the forums! To sign in via Steam: Click sign In (top right) > Complete your profile (choose display name and email address). If you have any issues completing your profile, please contact KeRRR or LiMaaa so we can assist you. You can contact us on Discord or the Steam Group

Jump to content
Luna

Discord bot

Recommended Posts

Luna    94

Well well well so I made a discord bot  it's kinda a fun bot it welcomes people, I'll show you a what one command looks like in code the command is purge deletes a certain amount of messages here is the code 

    } else

  if (message.content.startsWith(prefix + 'purge')) {
      let messagecount = parseInt(result);
      message.channel.fetchMessages({limit: messagecount}).then(messages => message.channel.bulkDelete(messages));
    } else
and if your going into Atom right now to put this in it's not gonna work you need a token need to make the bot as a developer and you need to download discord.js and get node but I use pm2 ill show you what it looks like and don't try to download pm2 and do pm2 stop LunaBot that's not gonna work you need the file and token so that was a little bit about my bot feel free to download it if you want https://discordapp.com/oauth2/authorize?client_id=309402595674423307&scope=bot&permissions=2146958591 ByePm2 LunaBot

  • Upvote 1

Share this post


Link to post
Share on other sites
KeRRR    741
19 hours ago, Minidove said:

sauce

code

pl0x

Agree. Please post source code in the future for projects like this, so users can inspect and make sure there is no malicious code.

  • Upvote 1

Share this post


Link to post
Share on other sites
Luna    94
5 hours ago, KeRRR said:

Agree. Please post source code in the future for projects like this, so users can inspect and make sure there is no malicious code.

So put it in coding and if made sure that it has no malicious code in it I will probably take out the link

Edited by Luna
  • Upvote 1

Share this post


Link to post
Share on other sites
KeRRR    741
56 minutes ago, Luna said:

So put it in coding and if made sure that it has no malicious code in it I will probably take out the link

What you can do in future is something like this:

 

Hey guys, here is a bot i made, it does this and this, link to download: cool discord bot link

/* HelloWorld.java
 */

public class HelloWorld
{
	public static void main(String[] args) {
		System.out.println("Hello World!");
	}
}

If the source code is relatively long. You can also upload a text file with it, so users can download and compare it, etc. Good practice.

  • Upvote 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×