Skip to content

Instantly share code, notes, and snippets.

View JMLutra's full-sized avatar
🦦

J_M_Lutra JMLutra

🦦
View GitHub Profile
@nkomarn
nkomarn / SendImage.java
Created March 24, 2019 21:02
Sample code that sends an image from a URL to the current channel in Discord JDA!
// Get channel name and send in current channel
String channelName = event.getChannel().getName();
event.getChannel().sendMessage(channelName).queue();
// Upload and send an image to current channel
try {
URL url = new URL("https://i.imgur.com/Jc4HEGN.jpg");
BufferedImage img = ImageIO.read(url);
File file = new File("temp.jpg"); // change the '.jpg' to whatever extension the image has
ImageIO.write(img, "jpg", file); // again, change 'jpg' to the correct extension
@Ryonez
Ryonez / (Unofficial) Discord server rules suggestions list.md
Last active April 25, 2024 12:53
(Unofficial) Discord server rules suggestions list

Discord

(Unofficial) Discord server rules suggestions list

Author's Note

I'll start off with letting you know this is a fork from someone else. However, for some bizarre reason, this is the one everyone finds, so I better get round to updating this. Credit to Cristiano#2233 for the original idea.

Also, I've had a lot of people saying the rules are to strict. If you pick all the rules here, you're right, it would be very strict. However the rules below are guidelines! They are there for you to pick the ones you desire, you can ignore ones you don't want. Hopefully they might help with rules you wouldn't have thought of otherwise.