Skip to content

Commit ab1e107

Browse files
committed
Initial commit: Werewolf Discord Bot
0 parents  commit ab1e107

44 files changed

Lines changed: 3743 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Lang/ENG/eng.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<strings>
3+
<string name="app_title">Werewolf Discord Bot</string>
4+
<string name="subtitle">Automated Werewolf Game on Discord</string>
5+
<string name="bot_config">BOT CONFIGURATION</string>
6+
<string name="token_label">Discord Bot Token</string>
7+
<string name="show_token">Show Token</string>
8+
<string name="help_text">Enter your Discord bot token here</string>
9+
<string name="warning_text">Do not share your token with anyone!</string>
10+
<string name="system_status">SYSTEM STATUS</string>
11+
<string name="status_offline">BOT OFFLINE</string>
12+
<string name="status_online">BOT ONLINE</string>
13+
<string name="status_error">BOT ERROR</string>
14+
<string name="detail_not_running">Not running</string>
15+
<string name="detail_running">Bot is running...</string>
16+
<string name="detail_stopped">Bot stopped</string>
17+
<string name="detail_error">Bot error - Check log</string>
18+
<string name="network_status">NETWORK STATUS</string>
19+
<string name="check_connection">Check Connection</string>
20+
<string name="auto_monitor">Auto Monitor</string>
21+
<string name="start_bot">START BOT</string>
22+
<string name="stop_bot">STOP BOT</string>
23+
<string name="restart_bot">RESTART</string>
24+
<string name="console_output">CONSOLE OUTPUT</string>
25+
<string name="clear_log">Clear</string>
26+
<string name="save_log">Save</string>
27+
<string name="auto_scroll">Auto Scroll</string>
28+
<string name="auto_reconnect">Auto Reconnect</string>
29+
<string name="copyright">2024 Werewolf Bot</string>
30+
<string name="internet_online">Internet Connection: ONLINE</string>
31+
<string name="internet_offline">Internet Connection: OFFLINE</string>
32+
<string name="internet_connected">✅ Internet connected</string>
33+
<string name="internet_disconnected">❌ No internet connection!</string>
34+
<string name="checking">Checking Connection...</string>
35+
<string name="language">Language</string>
36+
</strings>

Lang/ID/id.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<strings>
3+
<string name="app_title">Werewolf Discord Bot</string>
4+
<string name="subtitle">Game Werewolf Otomatis di Discord</string>
5+
<string name="bot_config">BOT CONFIGURATION</string>
6+
<string name="token_label">Discord Bot Token</string>
7+
<string name="show_token">Tampilkan Token</string>
8+
<string name="help_text">Masukkan token bot Discord Anda di sini</string>
9+
<string name="warning_text">Jangan bagikan token ke siapapun!</string>
10+
<string name="system_status">SYSTEM STATUS</string>
11+
<string name="status_offline">BOT OFFLINE</string>
12+
<string name="status_online">BOT ONLINE</string>
13+
<string name="status_error">BOT ERROR</string>
14+
<string name="detail_not_running">Belum dijalankan</string>
15+
<string name="detail_running">Bot sedang berjalan...</string>
16+
<string name="detail_stopped">Bot dihentikan</string>
17+
<string name="detail_error">Bot error - Cek log</string>
18+
<string name="network_status">NETWORK STATUS</string>
19+
<string name="check_connection">Cek Koneksi</string>
20+
<string name="auto_monitor">Auto Monitor</string>
21+
<string name="start_bot">START BOT</string>
22+
<string name="stop_bot">STOP BOT</string>
23+
<string name="restart_bot">RESTART</string>
24+
<string name="console_output">CONSOLE OUTPUT</string>
25+
<string name="clear_log">Clear</string>
26+
<string name="save_log">Save</string>
27+
<string name="auto_scroll">Auto Scroll</string>
28+
<string name="auto_reconnect">Auto Reconnect</string>
29+
<string name="copyright">2024 Werewolf Bot</string>
30+
<string name="internet_online">Koneksi Internet: ONLINE</string>
31+
<string name="internet_offline">Koneksi Internet: OFFLINE</string>
32+
<string name="internet_connected">✅ Internet terhubung</string>
33+
<string name="internet_disconnected">❌ Tidak ada koneksi internet!</string>
34+
<string name="checking">Cek Koneksi...</string>
35+
<string name="language">Bahasa</string>
36+
</strings>

Pic/Laycan.png

1020 KB
Loading

Pic/Readmd/image.png

117 KB
Loading

Pic/Seer.png

963 KB
Loading

Pic/Tough_guy.png

899 KB
Loading

Pic/Villager.png

955 KB
Loading

Pic/WareWolf.png

916 KB
Loading

Pic/Witch.png

774 KB
Loading

README.md

Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
# 🐺 Werewolf Discord Bot
2+
3+
[![Python](https://img.shields.io/badge/Python-3.8%2B-blue.svg)](https://www.python.org/)
4+
[![Discord.py](https://img.shields.io/badge/discord.py-2.3.2-green.svg)](https://github.com/Rapptz/discord.py)
5+
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6+
7+
---
8+
![Warewolf Bot GUI](/Pic/Readmd/image.png))
9+
## 🇮🇩 Indonesia
10+
11+
### 📖 Deskripsi
12+
Werewolf Discord Bot adalah bot Discord yang berjalan dengan local memungkinkan Anda bermain game Werewolf secara otomatis di server Discord Anda. Bot ini dilengkapi dengan GUI (Graphical User Interface) yang memudahkan pengaturan dan menjalankan bot.
13+
14+
### ✨ Fitur Utama
15+
- 🎮 **Game Werewolf Lengkap** - Mendukung hingga 10 pemain dengan berbagai role
16+
- 🎭 **Role Beragam** - Werewolf, Seer, Tough Guy, Witch, Laycan, Villager
17+
- 🌙 **Fase Malam** - Werewolf membunuh, Seer menerawang, Witch menyelamatkan
18+
- 🗳️ **Sistem Voting** - Voting untuk mengeksekusi pemain yang dicurigai
19+
- 🖥️ **GUI Modern** - Antarmuka grafis yang mudah digunakan
20+
- 🔌 **Auto Reconnect** - Bot akan mencoba terhubung kembali jika terputus
21+
- 📊 **Status Monitoring** - Monitor status bot dan koneksi internet
22+
23+
### 🎮 Role dan Kemampuan
24+
25+
| Role | Alignment | Kemampuan |
26+
|------|-----------|-----------|
27+
| 🐺 Werewolf | Jahat | Membunuh satu pemain setiap malam (hanya 1 per malam) |
28+
| 🔮 Seer | Baik | Melihat alignment (Baik/Jahat) seorang pemain |
29+
| 🛡️ Tough Guy | Baik | Membutuhkan 2 kali serangan untuk mati |
30+
| 🧙 Witch | Baik | Memiliki ramuan penyelamat (1x) |
31+
| 🌾 Laycan | Jahat | Warga desa biasa jika diterawang seer, aligmentnya jahat |
32+
| 🏘️ Villager | Baik | Warga biasa tanpa kemampuan khusus |
33+
34+
### 📝 Command
35+
36+
| Command | Deskripsi |
37+
|------|-----------|
38+
| /setmod | Pilih moderator game |
39+
| /start | Memuali Game (Hanya moderator) |
40+
| /night | Mulai Fase malam (moderator)|
41+
| /kill | Warewolf membunuh pemain |
42+
|/vote | Memulai sesi voting (moderator) |
43+
| /end | Mengakhiri game (moderator) |
44+
45+
### 📋 Persyaratan Sistem
46+
47+
- **Python** 3.8 atau lebih baru
48+
- **Discord Bot Token** (dapatkan dari [Discord Developer Portal](https://discord.com/developers/applications))
49+
- **Koneksi internet** yang stabil
50+
- **Library Python** (akan diinstall otomatis)
51+
52+
### 🔑 Cara Mendapatkan Token Bot Discord
53+
54+
#### 1: Buka Discord Developer Portal
55+
```bash
56+
https://discord.com/developers/applications
57+
```
58+
59+
#### 2: Buat Aplikasi Baru
60+
1. Klik tombol **"New Application"** di pojok kanan atas
61+
62+
2. Masukkan nama aplikasi (contoh: **Werewolf Bot**)
63+
64+
4. Centang kotak persetujuan dan klik "**Create**"
65+
66+
#### 3: Buat Bot
67+
1. Di menu sebelah kiri, klik "**Bot**"
68+
69+
2. Klik tombol "**Add Bot**"
70+
71+
3. Konfirmasi dengan klik "**Yes, do it!**"
72+
#### 4: Dapatkan Token Bot
73+
1. Di bagian "**Token**", klik "**Reset Token**"
74+
75+
2. Konfirmasi dengan klik "**Yes, do it!**"
76+
77+
3. Copy token yang muncul
78+
```bash
79+
Contoh token: MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.Gxxxxx.xxxxx-xxxxx_xxxxx
80+
```
81+
⚠️ PENTING: Token ini bersifat rahasia! Jangan bagikan ke siapapun!
82+
83+
#### 5: Invite Bot ke Server
84+
1. Di menu sebelah kiri, klik "**OAuth2**" → "**URL Generator**"
85+
86+
2. Di bagian "**Scopes**", centang:
87+
88+
- ✅ bot
89+
- ✅ applications.commands
90+
3. Di bagian "**Bot Permissions**", pilih permission yang diperlukan:
91+
92+
- ✅ Send Messages
93+
- ✅ Manage Messages
94+
- ✅ Embed Links
95+
- ✅ Read Message History
96+
- ✅ Use Slash Commands
97+
98+
Copy URL yang dihasilkan, paste di browser baru, pilih server, dan klik "**Authorize**"
99+
100+
## 📚 Referensi
101+
102+
- [Discord Developer Portal](https://discord.com/developers/applications)
103+
- [Discord API Documentation](https://discord.com/developers/docs/intro)
104+
- [Discord.py Documentation](https://discordpy.readthedocs.io/)
105+
106+
## ⚠️ Pemecahan Masalah
107+
108+
### ❌ Bot Tidak Online
109+
- Periksa kembali token yang Anda masukkan
110+
- Pastikan token sudah di-reset dan disalin dengan benar
111+
- Cek apakah koneksi internet Anda berfungsi
112+
113+
### ❌ Command Tidak Muncul
114+
- Tunggu 1-2 menit, terkadang perlu waktu untuk sinkronisasi
115+
- Periksa apakah bot memiliki izin `Use Slash Commands`
116+
- Restart bot dengan klik STOP lalu START
117+
118+
### ❌ Bot Tidak Bisa Mengirim DM
119+
- Pastikan pengguna mengizinkan DM dari member server
120+
- Atau atur di server: Pengaturan Server → Privasi → "Izinkan pesan langsung dari member server"
121+
122+
### ❌ Error "Improper token"
123+
- Token tidak valid, reset token di Developer Portal dan salin kembali
124+
125+
---
126+
127+
### 🔒 Tips Keamanan
128+
129+
1. **Jangan pernah membagikan token bot** kepada siapapun
130+
2. **Simpan token di file `.env`** (gunakan python-dotenv)
131+
3. **Jangan commit token ke GitHub**
132+
4. **Reset token** jika Anda curiga telah bocor
133+
134+
---
135+
---
136+
### 🚀 Cara Instalasi
137+
138+
#### 1. Clone Repository
139+
```bash
140+
git clone https://github.com/yourusername/werewolf-discord-bot.git
141+
cd werewolf-discord-bot
142+
pip install -r requirements.txt
143+
```
144+
145+
## 🇬🇧 English
146+
147+
### 📖 Description
148+
Werewolf Discord Bot is a locally-run Discord bot that allows you to play the Werewolf game automatically on your Discord server. The bot comes with a GUI (Graphical User Interface) for easy configuration and management.
149+
150+
### ✨ Features
151+
- 🎮 **Full Werewolf Game** – Supports up to 10 players with various roles
152+
- 🎭 **Diverse Roles** – Werewolf, Seer, Tough Guy, Witch, Laycan, Villager
153+
- 🌙 **Night Phase** – Werewolf kills, Seer sees, Witch saves
154+
- 🗳️ **Voting System** – Vote to execute suspected players
155+
- 🖥️ **Modern GUI** – Easy-to-use graphical interface
156+
- 🔌 **Auto Reconnect** – Bot attempts to reconnect if disconnected
157+
- 📊 **Status Monitoring** – Monitor bot status and internet connection
158+
159+
### 🎮 Roles and Abilities
160+
161+
| Role | Alignment | Ability |
162+
|------|-----------|---------|
163+
| 🐺 Werewolf | Evil | Kills one player each night (only 1 per night) |
164+
| 🔮 Seer | Good | Sees alignment (Good/Evil) of a player |
165+
| 🛡️ Tough Guy | Good | Requires 2 attacks to die |
166+
| 🧙 Witch | Good | Has a save potion (1x) |
167+
| 🌾 Laycan | Evil | Ordinary villager but appears Evil to Seer |
168+
| 🏘️ Villager | Good | Ordinary villager with no special abilities |
169+
170+
### 📝 Commands
171+
172+
| Command | Description |
173+
|---------|-------------|
174+
| `/setmod` | Select game moderator |
175+
| `/start` | Start the game (moderator only) |
176+
| `/night` | Start night phase (moderator only) |
177+
| `/endnight` | End night phase (moderator only) |
178+
| `/kill` | Werewolf kills a player |
179+
| `/terawang` | Seer sees a player |
180+
| `/vote` | Start voting session (moderator only) |
181+
| `/end` | End the game (moderator only) |
182+
| `/status` | Check game status (moderator only) |
183+
| `/guide` | Game guide |
184+
185+
### 📋 System Requirements
186+
- Python 3.8 or newer
187+
- Discord Bot Token (get from [Discord Developer Portal](https://discord.com/developers/applications))
188+
- Stable internet connection
189+
190+
## 🔑 How to Get a Discord Bot Token
191+
192+
### Step 1: Open Discord Developer Portal
193+
Open your browser and go to:
194+
Log in with your Discord account.
195+
196+
### Step 2: Create a New Application
197+
1. Click the **"New Application"** button in the top right corner
198+
2. Enter an application name (example: `Werewolf Bot`)
199+
3. Check the agreement box and click **"Create"**
200+
201+
### Step 3: Create a Bot
202+
1. In the left sidebar, click **"Bot"**
203+
2. Click the **"Add Bot"** button
204+
3. Confirm by clicking **"Yes, do it!"**
205+
206+
### Step 4: Get the Bot Token
207+
1. In the **"Token"** section, click **"Reset Token"**
208+
2. Confirm by clicking **"Yes, do it!"**
209+
3. **Copy** the token that appears
210+
```bash
211+
Example token: MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.Gxxxxx.xxxxx-xxxxx_xxxxx
212+
```
213+
214+
⚠️ **IMPORTANT:** This token is secret! Do not share it with anyone!
215+
216+
### Step 5: Enable Privileged Gateway Intents
217+
Scroll down to the **"Privileged Gateway Intents"** section and enable:
218+
-**MESSAGE CONTENT INTENT** (Required to read messages)
219+
-**SERVER MEMBERS INTENT** (Required for member data)
220+
221+
Click **"Save Changes"** after enabling.
222+
223+
### Step 6: Invite Bot to Your Server
224+
1. In the left sidebar, click **"OAuth2"****"URL Generator"**
225+
2. In the **"Scopes"** section, check:
226+
-`bot`
227+
-`applications.commands`
228+
3. In the **"Bot Permissions"** section, select the required permissions:
229+
-`Send Messages`
230+
-`Manage Messages`
231+
-`Embed Links`
232+
-`Read Message History`
233+
-`Use Slash Commands`
234+
4. **Copy** the generated URL, paste it in a new browser tab, select your server, and click **"Authorize"**
235+
236+
---
237+
238+
239+
## ⚠️ Troubleshooting
240+
241+
### ❌ Bot Not Online
242+
- Double-check the token you entered
243+
- Make sure the token was reset and copied correctly
244+
- Check if your internet connection is working
245+
246+
### ❌ Commands Not Showing
247+
- Wait 1-2 minutes, sometimes it takes time to sync
248+
- Check if the bot has the `Use Slash Commands` permission
249+
- Restart the bot by clicking STOP then START
250+
251+
### ❌ Bot Can't Send DMs
252+
- Make sure users allow DMs from server members
253+
- Or configure in server: Server Settings → Privacy → "Allow direct messages from server members"
254+
255+
### ❌ "Improper token" Error
256+
- Token is invalid, reset the token in Developer Portal and copy again
257+
258+
---
259+
260+
261+
## 📚 References
262+
263+
- [Discord Developer Portal](https://discord.com/developers/applications)
264+
- [Discord API Documentation](https://discord.com/developers/docs/intro)
265+
- [Discord.py Documentation](https://discordpy.readthedocs.io/)
266+
267+
---
268+
269+
By following this tutorial, you will have a bot token ready to use with the Werewolf Discord Bot! 🎮🐺
270+
271+
### 🚀 Installation
272+
273+
#### 1. Clone Repository
274+
```bash
275+
git clone https://github.com/yourusername/werewolf-discord-bot.git
276+
cd werewolf-discord-bot
277+
pip install -r requirements.txt
278+

0 commit comments

Comments
 (0)