Add basic README and ASCII logo
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
94c126e32b
commit
1f12dcbb1c
15
README.MD
Normal file
15
README.MD
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# HidekoBot
|
||||||
|
|
||||||
|
Hideko is a general-purpose Discord bot.
|
||||||
|
|
||||||
|
## Startup
|
||||||
|
Download a prebuilt JAR file or build it from source, then run it with:
|
||||||
|
```bash
|
||||||
|
java -jar HidekoBot.jar botToken
|
||||||
|
```
|
||||||
|
Where `HidekoBot.jar` is the executable archive and `botToken` is your bot token passed as an argument.
|
||||||
|
|
||||||
|
## Initial setup
|
||||||
|
|
||||||
|
After starting the bot up successfully, it will print an invite-link in your console. Click on the link to add your bot
|
||||||
|
to any server with the correct permissions already set-up.
|
@ -14,6 +14,8 @@ public class HidekoBot
|
|||||||
private static String standardInviteLink = "https://discord.com/oauth2/authorize?client_id=%userid%&scope=bot&permissions=8";
|
private static String standardInviteLink = "https://discord.com/oauth2/authorize?client_id=%userid%&scope=bot&permissions=8";
|
||||||
private static String botUserId;
|
private static String botUserId;
|
||||||
|
|
||||||
|
private static final String version = "0.0.1";
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -45,11 +47,15 @@ public class HidekoBot
|
|||||||
botUserId = jda.getSelfUser().getId();
|
botUserId = jda.getSelfUser().getId();
|
||||||
standardInviteLink = standardInviteLink.replace("%userid%", botUserId);
|
standardInviteLink = standardInviteLink.replace("%userid%", botUserId);
|
||||||
|
|
||||||
|
// print the bot logo.
|
||||||
|
logger.log("Ready!\n\n" + logger.getLogo() + "\nv" + version + " - bot is ready!\n", 2);
|
||||||
|
|
||||||
// log the invite-link to console so noob users can just click on it.
|
// log the invite-link to console so noob users can just click on it.
|
||||||
logger.log("Bot User ID: " + botUserId, 5);
|
logger.log("Bot User ID: " + botUserId, 5);
|
||||||
logger.log("Invite Link: " + standardInviteLink, 5);
|
logger.log("Invite Link: " + standardInviteLink, 5);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,15 @@ import java.util.concurrent.TimeUnit;
|
|||||||
public class Logger
|
public class Logger
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// cosmetic string to print on startup.
|
||||||
|
private String logo =
|
||||||
|
"██╗░░██╗██╗██████╗░███████╗██╗░░██╗░█████╗░\n" +
|
||||||
|
"██║░░██║██║██╔══██╗██╔════╝██║░██╔╝██╔══██╗\n" +
|
||||||
|
"███████║██║██║░░██║█████╗░░█████═╝░██║░░██║\n" +
|
||||||
|
"██╔══██║██║██║░░██║██╔══╝░░██╔═██╗░██║░░██║\n" +
|
||||||
|
"██║░░██║██║██████╔╝███████╗██║░╚██╗╚█████╔╝\n" +
|
||||||
|
"╚═╝░░╚═╝╚═╝╚═════╝░╚══════╝╚═╝░░╚═╝░╚════╝░";
|
||||||
|
|
||||||
// objects that we need to have for a properly formatted message
|
// objects that we need to have for a properly formatted message
|
||||||
private String className;
|
private String className;
|
||||||
private final String format = "[%date% %time%] [%class%] %message%";
|
private final String format = "[%date% %time%] [%class%] %message%";
|
||||||
@ -27,7 +36,7 @@ public class Logger
|
|||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
String currentDate = dateFormatter.format(now);
|
String currentDate = dateFormatter.format(now);
|
||||||
String currentTime = timeFormatter.format(now);
|
String currentTime = timeFormatter.format(now);
|
||||||
System.out.println(format
|
logRaw(format
|
||||||
.replace("%date%", currentDate)
|
.replace("%date%", currentDate)
|
||||||
.replace("%time%", currentTime)
|
.replace("%time%", currentTime)
|
||||||
.replace("%class%", className)
|
.replace("%class%", className)
|
||||||
@ -50,4 +59,16 @@ public class Logger
|
|||||||
}, delay, TimeUnit.SECONDS);
|
}, delay, TimeUnit.SECONDS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// avoid formatting the text and print whatever is passed.
|
||||||
|
public void logRaw(String message)
|
||||||
|
{
|
||||||
|
System.out.println(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogo()
|
||||||
|
{
|
||||||
|
return logo;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user