Skip to content

Commit 2b453dc

Browse files
committed
WoWChat Release
1 parent f339ed5 commit 2b453dc

Some content is hidden

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

48 files changed

+6411
-2
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
*iml
3+
target
4+
GreetBot

LICENSE

+674
Large diffs are not rendered by default.

README.md

+78-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,78 @@
1-
# wowchat
2-
WoWChat is a Discord integration chat bot for old versions of World of Warcraft.
1+
WoWChat -- README
2+
=================
3+
4+
WoWChat is a Discord integration chat bot for old versions of World of Warcraft. Features:
5+
* Clientless (Does not need the WoW Client to be open to run)
6+
* Seamless Chat integration of channels between WoW and Discord
7+
* Guild chat, Officer chat, Local chat, Emotes, Custom Channels.
8+
* In-game links (items, spells, ...) are displayed as links to classicdb or twinstar, depending on the expansion
9+
* Configurable message format
10+
* Custom commands
11+
* Check who is online in your guild
12+
* Query other players in the world
13+
* Runs as a Java program, and therefore works on Windows, Mac, and Linux.
14+
15+
Currently supported expansions are Vanilla, The Burning Crusade, and Wrath of the Lich King.
16+
17+
## How it works
18+
The bot uses Discord's API to login to your Discord server. It then uses supplied information
19+
to login as a WoW character onto your chosen server. Once it logs in to WoW as a character,
20+
and sees the configured channels. It will relay messages in Discord chat and WoW chat respectively.
21+
22+
##### DO NOT, under any circumstances, use this bot on an account with existing characters!
23+
Even though this bot does not do anything malicious, some servers may not like a bot connecting, and GMs may ban the account!
24+
25+
##### Watching GD's WotLK chat:
26+
![gd-echoes](https://raw.githubusercontent.com/fjaros/wowchat/master/images/example1.png)
27+
28+
##### Talking in Guild Chat:
29+
![guild-chat-construct](https://raw.githubusercontent.com/fjaros/wowchat/master/images/example2.png)
30+
31+
## Setup & Prerequisites
32+
33+
1. First you will want to create a Discord Bot on your discord account:
34+
* Go to https://discordapp.com/developers/applications/
35+
* Sign into your Discord account if necessary and click "Create an application"
36+
* Change the application name to something meaningful like "WoW Chat"
37+
* On the left click the Bot tab
38+
* Add a Bot
39+
* Uncheck Public Bot option
40+
* Under token click Copy. This is the value WoW Chat will use to login to Discord.
41+
2. Configure WoW Chat by opening `wowchat.conf` in a text editor.
42+
* You can also create your own file, using the supplied `wowchat.conf` as a template.
43+
* In section **discord**:
44+
* Paste the above copied Bot token after "token="
45+
* In section **wow**:
46+
* **version**: put either 1.12.1, 2.4.3, or 3.3.5 based on the server's expansion.
47+
* **realmlist**: this is server's realmlist, same as in your realmlist.wtf file.
48+
Example values are logon.lightshope.org or wow.gamer-district.org
49+
* **realm**: This is the realm name the Bot will connect to.
50+
It is the Text shown on top of character list window. Put ONLY the name, do NOT put the realm type like PVP or PVE.
51+
In the following example, the **realm** value is The Construct
52+
* ![realm-construct](https://raw.githubusercontent.com/fjaros/wowchat/master/images/example3.png)
53+
* **account**: The bot's WoW game account.
54+
* **password**: The bot's WoW game account password.
55+
* **character**: Your character's name as would be shown in the character list.
56+
* In section **chat**:
57+
* This section sets up the channel relays between Discord and WoW. You can have an unlimited number of channel relays.
58+
* **direction**: How do you want to relay each channel, put either
59+
**wow_to_discord**, **discord_to_wow**, or **both**.
60+
* **wow** section:
61+
* In type put one of, **Say**, **Guild**, **Officer**, **Emote**, **Yell**, **System**, **Channel**. This is the type of chat the Bot will read for this section.
62+
* If you put **type=Channel**, you also must provide a **channel=name of channel** value.
63+
* In format put how you want to display the message, supported replacable values are **%speaker**, **%message**, and **%channel** if above type is **Channel**.
64+
* **discord** section:
65+
* **channel**: The discord channel where to display the message.
66+
* **format**: Same options as in **wow** section above.
67+
3. If you do not wish to compile the bot yourself, a ready-made zip of the current release is also provided.
68+
* **Make sure you have a Java Runtime Environment (JRE) 1.8 or higher installed on your system!**
69+
* **On Windows**: Edit wowchat.conf as above and run `run.bat`
70+
* **On Mac/Linux**: Edit wowchat.conf as above and run `run.sh`
71+
72+
## Compilation
73+
74+
1. WoW Chat is written in Scala and compiles to a Java executable using [maven](https://maven.apache.org).
75+
2. It uses Java JDK 1.8 and Scala 2.12.6.
76+
3. Run `mvn clean package` which will produce a file in the target folder called `wowchat.zip`
77+
4. unzip `wowchat.zip`, edit the configuration file and run `java -jar wowchat.jar <config file>`
78+
* If no config file is supplied, the bot will try to use `wowchat.conf`

images/example1.png

284 KB
Loading

images/example2.png

287 KB
Loading

images/example3.png

20.3 KB
Loading

pom.xml

+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>wowchat</groupId>
8+
<artifactId>wowchat</artifactId>
9+
<version>1.0.0</version>
10+
11+
<properties>
12+
<java.version>1.8</java.version>
13+
<scala.version.major>2.12</scala.version.major>
14+
<scala.version.minor>6</scala.version.minor>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.scala-lang</groupId>
20+
<artifactId>scala-library</artifactId>
21+
<version>${scala.version.major}.${scala.version.minor}</version>
22+
</dependency>
23+
24+
<!-- Logging -->
25+
<dependency>
26+
<groupId>ch.qos.logback</groupId>
27+
<artifactId>logback-classic</artifactId>
28+
<version>1.2.3</version>
29+
</dependency>
30+
31+
<dependency>
32+
<groupId>com.typesafe.scala-logging</groupId>
33+
<artifactId>scala-logging_${scala.version.major}</artifactId>
34+
<version>3.9.0</version>
35+
</dependency>
36+
37+
<!-- config -->
38+
<dependency>
39+
<groupId>com.typesafe</groupId>
40+
<artifactId>config</artifactId>
41+
<version>1.3.3</version>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>io.netty</groupId>
46+
<artifactId>netty-all</artifactId>
47+
<version>4.1.29.Final</version>
48+
</dependency>
49+
50+
<dependency>
51+
<groupId>net.dv8tion</groupId>
52+
<artifactId>JDA</artifactId>
53+
<version>3.8.0_430</version>
54+
<exclusions>
55+
<exclusion>
56+
<groupId>org.restcomm.media.core.codec</groupId>
57+
<artifactId>opus-java</artifactId>
58+
</exclusion>
59+
</exclusions>
60+
</dependency>
61+
62+
<dependency>
63+
<groupId>com.vdurmont</groupId>
64+
<artifactId>emoji-java</artifactId>
65+
<version>4.0.0</version>
66+
</dependency>
67+
</dependencies>
68+
69+
<build>
70+
<plugins>
71+
<plugin>
72+
<groupId>net.alchim31.maven</groupId>
73+
<artifactId>scala-maven-plugin</artifactId>
74+
<version>3.3.2</version>
75+
<executions>
76+
<execution>
77+
<id>scala-compile</id>
78+
<phase>process-resources</phase>
79+
<goals>
80+
<goal>add-source</goal>
81+
<goal>compile</goal>
82+
</goals>
83+
</execution>
84+
</executions>
85+
<configuration>
86+
<scalaVersion>${scala.version.major}.${scala.version.minor}</scalaVersion>
87+
<args>
88+
<arg>-unchecked</arg>
89+
<arg>-deprecation</arg>
90+
<arg>-feature</arg>
91+
</args>
92+
<javacArgs>
93+
<javacArg>-source</javacArg>
94+
<javacArg>${java.version}</javacArg>
95+
<javacArg>-target</javacArg>
96+
<javacArg>${java.version}</javacArg>
97+
</javacArgs>
98+
</configuration>
99+
</plugin>
100+
<plugin>
101+
<groupId>pl.project13.maven</groupId>
102+
<artifactId>git-commit-id-plugin</artifactId>
103+
<version>2.2.5</version>
104+
<executions>
105+
<execution>
106+
<id>get-the-git-infos</id>
107+
<goals>
108+
<goal>revision</goal>
109+
</goals>
110+
</execution>
111+
</executions>
112+
<configuration>
113+
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
114+
<prefix>git</prefix>
115+
<verbose>false</verbose>
116+
<generateGitPropertiesFile>true</generateGitPropertiesFile>
117+
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
118+
<format>json</format>
119+
<gitDescribe>
120+
<skip>false</skip>
121+
<always>false</always>
122+
<dirty>-dirty</dirty>
123+
</gitDescribe>
124+
<includeOnlyProperties>
125+
<includeOnlyProperty>git.commit.id$</includeOnlyProperty>
126+
</includeOnlyProperties>
127+
</configuration>
128+
</plugin>
129+
<plugin>
130+
<groupId>org.apache.maven.plugins</groupId>
131+
<artifactId>maven-shade-plugin</artifactId>
132+
<version>3.1.1</version>
133+
<executions>
134+
<execution>
135+
<phase>package</phase>
136+
<goals>
137+
<goal>shade</goal>
138+
</goals>
139+
</execution>
140+
</executions>
141+
<configuration>
142+
<finalName>wowchat</finalName>
143+
<filters>
144+
<filter>
145+
<artifact>*:*</artifact>
146+
<excludes>
147+
<exclude>META-INF/*.SF</exclude>
148+
<exclude>META-INF/*.DSA</exclude>
149+
<exclude>META-INF/*.RSA</exclude>
150+
<exclude>logback.xml</exclude>
151+
<exclude>*.conf</exclude>
152+
</excludes>
153+
</filter>
154+
</filters>
155+
<transformers>
156+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
157+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
158+
<manifestEntries>
159+
<Main-Class>wowchat.WoWChat</Main-Class>
160+
</manifestEntries>
161+
</transformer>
162+
</transformers>
163+
</configuration>
164+
</plugin>
165+
<plugin>
166+
<groupId>org.apache.maven.plugins</groupId>
167+
<artifactId>maven-assembly-plugin</artifactId>
168+
<version>2.6</version>
169+
<configuration>
170+
<finalName>${project.artifactId}-${project.version}</finalName>
171+
<descriptor>src/main/assembly/assembly.xml</descriptor>
172+
<appendAssemblyId>false</appendAssemblyId>
173+
<tarLongFileMode>posix</tarLongFileMode>
174+
</configuration>
175+
<executions>
176+
<execution>
177+
<phase>package</phase>
178+
<goals>
179+
<goal>single</goal>
180+
</goals>
181+
</execution>
182+
</executions>
183+
</plugin>
184+
</plugins>
185+
</build>
186+
187+
<repositories>
188+
<repository>
189+
<id>jcenter</id>
190+
<name>jcenter-bintray</name>
191+
<url>http://jcenter.bintray.com</url>
192+
</repository>
193+
</repositories>
194+
</project>

src/main/assembly/assembly.xml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
4+
5+
<id>${project.artifactId}</id>
6+
7+
<formats>
8+
<format>zip</format>
9+
</formats>
10+
11+
<includeBaseDirectory>true</includeBaseDirectory>
12+
<baseDirectory>${project.artifactId}</baseDirectory>
13+
14+
<fileSets>
15+
<fileSet>
16+
<outputDirectory/>
17+
<directory>${project.build.directory}</directory>
18+
<includes>
19+
<include>${project.artifactId}.jar</include>
20+
</includes>
21+
<fileMode>0644</fileMode>
22+
</fileSet>
23+
<fileSet>
24+
<outputDirectory/>
25+
<directory>src/main/resources</directory>
26+
<includes>
27+
<include>logback.xml</include>
28+
<include>wowchat.conf</include>
29+
<include>run.bat</include>
30+
<include>run.sh</include>
31+
</includes>
32+
<fileMode>0644</fileMode>
33+
</fileSet>
34+
</fileSets>
35+
</assembly>

src/main/resources/logback.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<configuration>
2+
3+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
4+
<encoder>
5+
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{16} - %msg%n</pattern>
6+
</encoder>
7+
</appender>
8+
9+
<logger name="net.dv8tion.jda.core.requests.Requester" level="INFO" />
10+
<logger name="wowchat.game.GamePacketDecoder" level="INFO" />
11+
12+
<root level="INFO">
13+
<appender-ref ref="STDOUT" />
14+
</root>
15+
</configuration>

src/main/resources/run.bat

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
java -Dlogback.configurationFile=logback.xml -jar wowchat.jar wowchat.conf
2+
pause

src/main/resources/run.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
java -Dlogback.configurationFile=logback.xml -jar wowchat.jar wowchat.conf

0 commit comments

Comments
 (0)