forked from jagrosh/MusicBot
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ryuuta0217/master
ニコニコ動画対応と和訳修正
- Loading branch information
Showing
8 changed files
with
159 additions
and
270 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
*/ | ||
package com.jagrosh.jmusicbot.utils; | ||
|
||
import java.io.PrintWriter; | ||
import java.io.StringWriter; | ||
import java.io.Writer; | ||
import java.util.List; | ||
import net.dv8tion.jda.core.entities.Role; | ||
import net.dv8tion.jda.core.entities.TextChannel; | ||
|
@@ -25,7 +28,14 @@ | |
* @author John Grosh <[email protected]> | ||
*/ | ||
public class FormatUtil { | ||
|
||
public static String getStacktraceByString(Throwable t) { | ||
StringWriter sw = new StringWriter(); | ||
PrintWriter pw = new PrintWriter(sw); | ||
t.printStackTrace(pw); | ||
pw.flush(); | ||
return sw.toString(); | ||
} | ||
|
||
public static String formatTime(long duration) | ||
{ | ||
if(duration == Long.MAX_VALUE) | ||
|
Oops, something went wrong.