Metadata-Version: 2.4
Name: discordads
Version: 1.0.1
Summary: BotAdNetwork SDK for Discord Bots
Home-page: https://github.com/ASDF3001/BotAdNetwork
Author: rds9
Author-email: rds9discord@outlook.jp
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: discord.py>=2.3.0
Requires-Dist: aiohttp>=3.8.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# BotAdNetwork / discordads

[English](#english) | [日本語](#japanese)

---

<a id="english"></a>
## English

**BotAdNetwork** is a mutual advertising network platform for Discord bots. 
The `discordads` SDK allows developers to integrate this advertising network into their existing Discord bots with minimal configuration.

### Features
- **One-Line Integration**: Easily add advertising capabilities to your bot using the `discordads` package.
- **Earn Points**: Accumulate points by displaying ads on your servers.
- **Promote Your Content**: Spend earned points to promote your Discord server, bot, YouTube channel, Twitch stream, or website.
- **Web Dashboard**: Manage campaigns and view analytics through the dedicated FastAPI dashboard.

### Installation

```bash
pip install discordads
```

### Quick Start (SDK)

Integrate the SDK into your existing `discord.py` bot:

```python
import discord
from discord.ext import commands
import discordads

bot = commands.Bot(command_prefix="!", intents=discord.Intents.default())

@bot.event
async def on_ready():
    # Initialize the discordads SDK
    await discordads.setup(
        bot, 
        api_base_url="https://your-botadnetwork-dashboard.com", 
        publisher_id="YOUR_GUILD_ID"
    )
    print(f"Logged in as {bot.user}")

bot.run("YOUR_DISCORD_TOKEN")
```

Once integrated, users can run the `/ad` command in your bot to view ads and generate points for your server.

### Self-Hosting the Dashboard
If you want to host the BotAdNetwork backend (FastAPI + Database), please refer to the repository source code. It includes an async SQLAlchemy setup, OAuth2 authentication, and a Gemini API integration for ad moderation.

---

<a id="japanese"></a>
## 日本語

**BotAdNetwork** は、Discord Bot向けの相互広告ネットワークプラットフォームです。
`discordads` SDKを使用することで、既存のDiscord Botに最小限の設定で広告ネットワークを組み込むことができます。

### 主な機能
- **簡単導入**: `discordads` パッケージを使用し、わずかなコードでBotに広告機能を追加。
- **ポイント獲得**: Botを導入しているサーバーで広告を表示させることでポイントを獲得。
- **コンテンツの宣伝**: 獲得したポイントを使用して、自分のサーバー、Bot、YouTube、Twitch、Webサイトなどを宣伝可能。
- **Webダッシュボード**: FastAPIベースのダッシュボードで、広告キャンペーンの管理やアナリティクスの確認が可能。

### インストール

```bash
pip install discordads
```

### 使い方 (SDK)

既存の `discord.py` Botに組み込む例:

```python
import discord
from discord.ext import commands
import discordads

bot = commands.Bot(command_prefix="!", intents=discord.Intents.default())

@bot.event
async def on_ready():
    # discordads SDKの初期化
    await discordads.setup(
        bot, 
        api_base_url="https://your-botadnetwork-dashboard.com", 
        publisher_id="報酬を受け取るサーバーのID"
    )
    print(f"Logged in as {bot.user}")

bot.run("YOUR_DISCORD_TOKEN")
```

組み込み完了後、Bot内で `/ad` コマンドを実行することで広告が表示され、指定したサーバーにポイントが付与されます。

### ダッシュボードのセルフホスト
BotAdNetworkのバックエンド（FastAPI + データベース）をご自身でホストする場合は、リポジトリのソースコードを参照してください。非同期SQLAlchemy、OAuth2認証、および広告審査用のGemini API連携が含まれています。

### License / ライセンス

The BotAdNetwork core application (Web Dashboard, Backend, Bot Core) is licensed under the [AGPL-3.0 License](LICENSE).  
However, the `discordads` SDK (located in the `discordads/` directory and published on PyPI) is licensed under the [MIT License](discordads/LICENSE). You can freely integrate the `discordads` SDK into your own proprietary or open-source Discord bots without being subject to the AGPL-3.0 copyleft requirements.

BotAdNetworkのコアアプリケーション（Webダッシュボード、バックエンド、Bot本体）は **[AGPL-3.0 License](LICENSE)** の下で提供されています。
ただし、外部のBotに組み込むための `discordads` SDK（`discordads/` ディレクトリ内のコードおよびPyPI配布物）は **[MIT License](discordads/LICENSE)** の下で提供されています。そのため、ご自身のDiscord Bot（クローズドソースを含む）に `discordads` パッケージを組み込んで使用しても、AGPL-3.0のソースコード公開義務は発生しません。安心してご自身のプロジェクトにご活用ください。
