Botti keskusteluohjelmaan Javalla : Discord-ohjelmointirajapinta ja teknologiat
Johansson, Ossian (2020)
Johansson, Ossian
2020
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2020060417004
https://urn.fi/URN:NBN:fi:amk-2020060417004
Tiivistelmä
Tämän toiminnallisen opinnäytetyön tarkoituksena oli tuottaa bottisovellus Discord-keskusteluohjelmaan Java-ohjelmointikielellä. Botin ominaisuuksiin kuuluu yleisten web-palveluiden yhdistäminen Discord-keskusteluohjelmaan hakukomentojen avulla, JSON-hakija komento ja muutama yksinkertaisempi peruskomento. Tunnetuista web-palveluista valittiin kaksi, Wikipedia ja YouTube. Java-teknologian lisäksi muita käytettyjä teknologioita ovat Maven, REST, JSON ja WebSocket. Sovellus yhdistettiin Discordiin kolmannen osapuolen JDA-rajapinnan avulla. Sovellusta testattiin Raspberry Pi 3 B pienoistietokoneella, jossa käyttöjärjestelmä toimi Linux Raspbian.
Tuloksena on toimiva bottisovellus, jolla on myös pitkä käyttöaika Raspberry Pi -laitteella. Sovellus on kevyt, ja se sisältää tiivistä ohjelmakoodia. Sovelluksen kaikki komennot toimivat ja antavat halutun tuloksen oikein käytettynä. Sovellukseen voidaan kehittää useita lisäominaisuuksia, tärkeimpänä JSON-hakijaan pohjautuvat toiminnot.
Työn aikana tekijän ohjelmointitaidot karttuivat ja tietämys useista web-palveluihin liittyvistä teknologioista lisääntyi huomattavasti. Nämä asiat antavat hyvän pohjan aloittaa työelämä ohjelmoinnin parissa. The purpose of this functional thesis was to produce a Java based bot application for the Discord VoIP application. Features of the bot include connecting universal web services to the Discord chat program using search commands, a JSON checker command, and a few simpler basic commands. Two of the well-known universal web services were selected, Wikipedia and YouTube. In addition to Java technology, other technologies used in this work include Maven, REST, JSON, and WebSocket. The application was connected to Discord via a third-party API called JDA. The application was tested on a Raspberry Pi 3 B minicomputer running Linux Rasp-bian.
The result is a working bot application that also has a long runtime with the Raspberry Pi. The application is lightweight and contains concise program code. All commands in the application work and give the desired result when used correctly. Several additional features can be devel-oped for the application, most importantly functions based on the JSON checker.
During the work, the author's programming skills accumulated, and knowledge of several tech-nologies related to web services increased significantly. These things provide a good foundation to start working life in programming.
Tuloksena on toimiva bottisovellus, jolla on myös pitkä käyttöaika Raspberry Pi -laitteella. Sovellus on kevyt, ja se sisältää tiivistä ohjelmakoodia. Sovelluksen kaikki komennot toimivat ja antavat halutun tuloksen oikein käytettynä. Sovellukseen voidaan kehittää useita lisäominaisuuksia, tärkeimpänä JSON-hakijaan pohjautuvat toiminnot.
Työn aikana tekijän ohjelmointitaidot karttuivat ja tietämys useista web-palveluihin liittyvistä teknologioista lisääntyi huomattavasti. Nämä asiat antavat hyvän pohjan aloittaa työelämä ohjelmoinnin parissa.
The result is a working bot application that also has a long runtime with the Raspberry Pi. The application is lightweight and contains concise program code. All commands in the application work and give the desired result when used correctly. Several additional features can be devel-oped for the application, most importantly functions based on the JSON checker.
During the work, the author's programming skills accumulated, and knowledge of several tech-nologies related to web services increased significantly. These things provide a good foundation to start working life in programming.