discord.js-settings
v1.0.0
Published
Discordのアプリケーション情報(名前・説明・アイコン)を更新できるシンプルなNode.js用APIラッパーです。
Readme
discord.js-settings
Discordのアプリケーション情報(名前・説明・アイコン)を更新できるシンプルなNode.js用APIラッパーです。
⚠️ このライブラリはユーザートークンを使用します(Botトークンではありません)
📦 インストール
npm install https://github.com/executecode1/discord.js-settings🛠 必要条件
- Node.js 18以上(fetchが使用可能な環境)
🚀 使い方
const { Client } = require('discord.js-settings');
const client = new Client('YOUR_USER_TOKEN', 'APPLICATION_ID');
client.edit({
name: 'New App Name',
description: 'This is my updated app description',
iconPath: './icon.png'
});⚙️ コンストラクタ
new Client(userToken, appId)| 引数 | 型 | 説明 | | --------- | ------ | --------------------- | | userToken | string | Discordユーザーアカウントのトークン | | appId | string | 対象のアプリケーションID |
✏️ メソッド
edit(options)
アプリケーションの情報を更新します。
引数
| 名前 | 型 | 必須 | 説明 | | ----------- | ------ | -- | -------- | | name | string | 任意 | アプリ名 | | description | string | 任意 | 説明文 | | iconPath | string | 任意 | ローカル画像パス |
例
await client.edit({
name: 'My App',
description: 'Updated description'
});🖼 画像について
- ローカルファイルをBase64に変換して送信します
- 対応形式: png / jpg / jpeg / gif など
iconPath: './icon.png'📡 レスポンス
- 成功時: 更新後のアプリケーション情報(JSON)
- 失敗時: null(コンソールにエラー出力)
⚠️ 注意
- ユーザートークンの使用はDiscordの利用規約に違反する可能性があります
- 自己責任で使用してください
- レート制限あります
🧩 ファイル構成例
project/
├── index.js
└── icon.png