{"id":2429,"date":"2019-07-18T21:40:28","date_gmt":"2019-07-18T12:40:28","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2429"},"modified":"2019-08-17T19:01:55","modified_gmt":"2019-08-17T10:01:55","slug":"backup-discord-chat-log-on-linux","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2019\/07\/18\/backup-discord-chat-log-on-linux\/","title":{"rendered":"Linux \u3067Discord \u306echat log \u3092backup \u3059\u308b"},"content":{"rendered":"<div class=\"paragraph\">\n<p>\u5148\u65e5Discord \u306etext chat \u3067\u52c9\u5f37\u4f1a\u3092\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u30ed\u30b0\u306f\u3044\u3064\u307e\u3067\u6b8b\u308b\u306e\u304b\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u3057\u4fdd\u5b58\u3067\u304d\u306a\u3044\u304b\u306a\u3068\u63a2\u3057\u3066\u307f\u308b\u3068 <code>DiscordChatExporter<\/code> \u3068\u3044\u3046\u3082\u306e\u3092\u898b\u3064\u3051\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/www.tyrrrz.me\/Projects\/DiscordChatExporter\">DiscordChatExporter \u2013 Alexey Golub<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u65e9\u901fDL \u3057\u3066\u307f\u308b\u3068.exe \u306e\u3088\u3046\u3067\u3059\uff0eGUI\u7248\uff0cCli\u7248\u304c\u3042\u308b\u306e\u3067\u3069\u3061\u3089\u304b\u304cWine \u3067\u52d5\u304b\u306a\u3044\u304b\u306a?\u3068\u8a66\u3057\u3066\u307f\u308b\u3068mono \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6c42\u3081\u3089\u308c\u307e\u3057\u305f\uff0e\u3066\u3053\u3068\u306fmono \u304c\u3042\u308c\u3070\u52d5\u304f\u306e\u3067\u306f?\u3068\u8a66\u3057\u305f\u3089\u52d5\u304d\u307e\u3057\u305f\uff0e\u3066\u304b\uff0cGitHub \u306eWiki \u30da\u30fc\u30b8\u306bWindows, macOS, Linux\u5404\u7a2e\u74b0\u5883\u3067\u306e\u4f7f\u3044\u65b9\u3082\u8f09\u3063\u3066\u3044\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>(Wine \u3068mono \u3069\u3061\u3089\u3067\u3082\u52d5\u304f\u3051\u3069\uff0c\u5727\u5012\u7684\u306bmono \u306e\u307b\u3046\u304c\u8efd\u304b\u3063\u305f\u306e\u3067mono \u3067\u52d5\u304b\u3057\u307e\u3057\u3087\u3046)<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5c0e\u5165\u65b9\u6cd5\u306f\u3053\u3053\u306b\u8f09\u3063\u3066\u3044\u307e\u3059\uff0e\u3053\u306e\u30da\u30fc\u30b8\u306eDebian 9 \u306e\u4f8b\u3067\u306fmono \u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u304c\uff0cDebian sid \u74b0\u5883\u3067\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u7248\u306e\u307e\u307e\u3067\u52d5\u304d\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/Tyrrrz\/DiscordChatExporter\/wiki\/Linux-usage-instructions\">Linux usage instructions \u00b7 Tyrrrz\/DiscordChatExporter Wiki \u00b7 GitHub<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">Debian sid amd64\u3067\u306emono\u306e\u5c0e\u5165<\/div>\n<div class=\"content\">\n<pre>$ sudo apt install mono-devel<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>release \u30da\u30fc\u30b8\u304b\u3089\u6700\u65b0\u7248\u3092\u5165\u624b\uff0e\u4eca\u56de\u306fCli\u7248\u306e\u6700\u65b0\u306e2.14\u3092\u5165\u624b\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">DiscordChatExporter.CLI \u306e\u5165\u624b\u3068\u5c55\u958b<\/div>\n<div class=\"content\">\n<pre>$ wget https:\/\/github.com\/Tyrrrz\/DiscordChatExporter\/releases\/download\/2.14\/DiscordChatExporter.CLI.zip\r\n$ unzip -l DiscordChatExporter.CLI.zip\r\n$ mkdir DiscordChatExporter.CLI\r\n$ cd DiscordChatExporter.CLI\r\n$ unzip ..\/DiscordChatExporter.CLI.zip<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">usage<\/div>\n<div class=\"content\">\n<pre>$ mono .\/DiscordChatExporter.Cli.exe\r\nDiscordChatExporter 2.14\r\nCopyright (c) Alexey Golub\r\nERROR(S):\r\nNo verb selected.\r\n\r\n  export         Export channel.\r\n\r\n  exportdm       Export all direct message channels.\r\n\r\n  exportguild    Export all channels within a given guild.\r\n\r\n  channels       Get the list of channels in the given guild.\r\n\r\n  dm             Get the list of direct message channels.\r\n\r\n  guilds         Get the list of accessible guilds.\r\n\r\n  help           Display more information on a specific command.\r\n\r\n  version        Display version information.\r\n\r\n# To get user token:\r\n 1. Open Discord\r\n 2. Press Ctrl+Shift+I to show developer tools\r\n 3. Navigate to the Application tab\r\n 4. Select \"Local Storage\" &gt; \"https:\/\/discordapp.com\" on the left\r\n 5. Press Ctrl+R to reload\r\n 6. Find \"token\" at the bottom and copy the value\r\n\r\n# To get bot token:\r\n 1. Go to Discord developer portal\r\n 2. Open your application's settings\r\n 3. Navigate to the Bot section on the left\r\n 4. Under Token click Copy\r\n\r\n# To get guild ID or guild channel ID:\r\n 1. Open Discord\r\n 2. Open Settings\r\n 3. Go to Appearance section\r\n 4. Enable Developer Mode\r\n 5. Right click on the desired guild or channel and click Copy ID\r\n\r\n# To get direct message channel ID:\r\n 1. Open Discord\r\n 2. Open the desired direct message channel\r\n 3. Press Ctrl+Shift+I to show developer tools\r\n 4. Navigate to the Console tab\r\n 5. Type \"window.location.href\" and press Enter\r\n 6. Copy the first long sequence of numbers inside the URL<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u6b21\u306f\u30c8\u30fc\u30af\u30f3\u3068\u30c1\u30e3\u30f3\u30cd\u30ebID\u3092\u5165\u624b\u3057\u307e\u3059\uff0e\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/Tyrrrz\/DiscordChatExporter\/wiki\/Obtaining-Token-and-Channel-IDs\">Obtaining Token and Channel IDs \u00b7 Tyrrrz\/DiscordChatExporter Wiki \u00b7 GitHub<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"ulist\">\n<div class=\"title\">\u30c8\u30fc\u30af\u30f3\u306e\u5165\u624b<\/div>\n<ul>\n<li>\n<p>Discord \u306eDesktop\u7248\u3092\u958b\u3044\u305f\u72b6\u614b\u3067\uff0c\u300cCtrl+Shift+I\u300d\u3092\u62bc\u3057\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30c4\u30fc\u30eb\u3092\u8868\u793a\u3059\u308b\uff0e<\/p>\n<\/li>\n<li>\n<p>Application tab \u306b\u79fb\u52d5\u3059\u308b\uff0e<\/p>\n<\/li>\n<li>\n<p>Ctrl+R \u3092\u62bc\u3057\u3066\u518d\u8aad\u8fbc\u3092\u884c\u3046<\/p>\n<\/li>\n<li>\n<p>\u300cStorage\u300d\u306e\u300cLocal Storage\u300d\u304b\u3089\u300chttps:\/\/discordapp.com\u300d\u3092\u9078\u629e\uff0e<\/p>\n<\/li>\n<li>\n<p>\u300ctoken\u300d\u3092\u63a2\u3057\u3066\u305d\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\uff0e<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u203bDiscord Web\u7248\u3067\u3082Chrome\u7cfb\u306a\u3089\u540c\u3058\u624b\u9806\u3067OK <br \/>\n\uff08\u591a\u5206\u3053\u306e\u65b9\u6cd5\u306f\u304a\u884c\u5100\u304c\u60aa\u3044\u65b9\u6cd5\uff0e\u306a\u306e\u3067bot \u306etoken \u3092\u4f7f\u3046\u624b\u9806\u306e\u307b\u3046\u304c\u3044\u3044\uff0e\u3067\u3082\u3046\u307e\u304f\u884c\u304b\u306a\u3044?\uff09<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/i.postimg.cc\/W4ZyZtdk\/20190718-20-07-11-2325.jpg\" alt=\"20190718 20 07 11 2325\"\/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u6b21\u306b\uff0c\u30c1\u30e3\u30f3\u30cd\u30ebID \u3092\u5165\u624b\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<div class=\"title\">\u30c1\u30e3\u30f3\u30cd\u30ebID \u306e\u5165\u624b<\/div>\n<ul>\n<li>\n<p>Discord\u30a2\u30d7\u30ea\u306e\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u3092\u958b\u304f\uff0e<\/p>\n<\/li>\n<li>\n<p>\u300c\u30c6\u30fc\u30de\u300d\u30bf\u30d6\u304b\u3089\u8a73\u7d30\u8a2d\u5b9a\u306e\u300c\u958b\u767a\u8005\u30e2\u30fc\u30c9\u300d\u3092On \u306b\u79fb\u52d5\u3059\u308b\uff0e<\/p>\n<\/li>\n<li>\n<p>\u8a2d\u5b9a\u753b\u9762\u3092\u9589\u3058\u3066\uff0c\u5165\u624b\u3057\u305f\u3044\u30c1\u30e3\u30f3\u30cd\u30eb\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3092\u62bc\u3057\u300cID\u3092\u30b3\u30d4\u30fc\u300d\u3067\u5165\u624b\u3059\u308b\uff0e<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u203bDiscord Web\u7248\u306e\u5834\u5408\u306f\uff0c\u8a72\u5f53\u30c1\u30e3\u30f3\u30cd\u30eb\u3092\u958b\u3044\u305f\u3068\u304d\u306eURL\u306e\u6700\u5f8c\u306e\u90e8\u5206\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/i.postimg.cc\/wTxnr6GC\/20190718-20-07-49-1205.jpg\" alt=\"20190718 20 07 49 1205\"\/><\/span><br \/>\n<span class=\"image\"><img decoding=\"async\" src=\"https:\/\/i.postimg.cc\/FFV2GfDb\/20190718-20-07-17-1824.jpg\" alt=\"20190718 20 07 17 1824\"\/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5165\u624b\u3057\u305f\u30c8\u30fc\u30af\u30f3\u3068\u30c1\u30e3\u30f3\u30cd\u30ebID\u3067\u66f8\u304d\u51fa\u3057\u3092\u8a66\u3057\u307e\u3059\uff0e<br \/>\n\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\uff0c<br \/>\n\u30c8\u30fc\u30af\u30f3\u304c\uff0c<code>MzU0NTM6MEg5NDAzNjQ2OTU0.XEhoGd.9h5f9dguNp-xSqbIwa8mNL1DU4D`\u3067\uff0c\u30c1\u30e3\u30f3\u30cd\u30ebID\u304c`999999999999999999<\/code> \u3060\u3063\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ mono .\/DiscordChatExporter.Cli.exe export -t 'MzU0NTM6MEg5NDAzNjQ2OTU0.XEhoGd.9h5f9dguNp-xSqbIwa8mNL1DU4D' -c '999999999999999999'\r\nExporting channel [999999999999999999]... 23.8 %\r\n                                          44.3 %\r\n                                          64.5 %\r\n                                          90.0 %\r\n                                          100.0 %\r\n                                          Completed \u2713<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3046\u307e\u304f\u884c\u3051\u3070.html \u30d5\u30a1\u30a4\u30eb\u304c\u66f8\u304d\u51fa\u3055\u308c\u307e\u3059\uff0e<br \/>\n\u305f\u3060\u3057\uff0c\u3053\u306ehtml \u30d5\u30a1\u30a4\u30eb\u306b\u306f\u753b\u50cf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\uff0e\u4e00\u65e6\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u3044\u3066\u4fdd\u5b58\u3059\u308b\u3068\u753b\u50cf\u3082\u4fdd\u5b58\u3067\u304d\u308b\u306e\u3067\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u4f7f\u3046\u306f\u305d\u3046\u3057\u3066\u304a\u3044\u305f\u307b\u3046\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ dpkg-query -W mono-devel wine chromium discord\r\nchromium        76.0.3809.62-1\r\ndiscord 0.0.9\r\nmono-devel      5.18.0.240+dfsg-3\r\nwine    4.0-2\r\n$ hostnamectl | egrep 'Operating System|Architecture'\r\n  Operating System: Debian GNU\/Linux bullseye\/sid\r\n      Architecture: x86-64<\/pre>\n<\/div>\n<\/div>\n<p><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;language=ja_JP&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B00DLK4GN8&#038;linkId=ecf717e0ef9fb093cbb6410e968f1f1d\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;language=ja_JP&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B01GHOM67W&#038;linkId=f1d7851390a54fa37e5ca78614f0ab68\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;language=ja_JP&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B07SSGTP7W&#038;linkId=0c4f4a865d453c90fb3a1c4e89c81da2\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u65e5Discord \u306etext chat \u3067\u52c9\u5f37\u4f1a\u3092\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u30ed\u30b0\u306f\u3044\u3064\u307e\u3067\u6b8b\u308b\u306e\u304b\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u3057\u4fdd\u5b58\u3067\u304d\u306a\u3044\u304b\u306a\u3068\u63a2\u3057\u3066\u307f\u308b\u3068 DiscordChatExporter \u3068\u3044\u3046\u3082\u306e\u3092\u898b\u3064\u3051\u307e\u3057\u305f\uff0e DiscordC [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[7,6,199],"tags":[469],"class_list":["post-2429","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","tag-discord"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2429"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2429\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}