DiscOrDance Add REVEAL DiscOrDance Bot to Server
DiscOrDance is being developed by Marco Raglianti as part of his Ph.D. in Software Engineering.
- Pharo 8
To start using DiscOrDance in Pharo create a fresh image of Pharo 8 and run the following commands in a playground:
Metacello new
baseline: 'DiscOrDance';
repository: 'github://USIREVEAL/discordance:main';
onWarning: [ :ex | (ex isKindOf: MCMergeOrLoadWarning) ifTrue: [ ex load ] ifFalse: [ ex resume ] ];
load.
To create a private bot:
- Log in to https://discord.com/developers/applications
- Create a
New Application
through the button - Give it a name and accept the Terms of Service for Discord
- (Optional) Add description and tags in the
General Information
- Go to
Settings -> Bot
in the left pane - Click on
Reset Token
and copy or take note of theTOKEN
(see'YOUR_API_TOKEN_HERE'
in the Customize section) to authorize the bot (in case you lose this you can generate it again from here) - In the
Privileged Gateway Intents
, enableServer Member Intent
andMessage Content Intent
and save the changes - Go to
Oauth2 -> URL Generator
and addbot
scope andRead Message History
permissions
Copy and use the generated link to add the newly created bot to a server of interest (See Adding DiscOrDance to the server).
To make a private server visible to DiscOrDance after adding the bot to the server (see Create a Private Bot), set the generated api token as value for the environment variable DISCORD_API_TOKEN
:
Smalltalk os environment at: 'DISCORD_API_TOKEN' put: 'YOUR_API_TOKEN_HERE'.
Open DiscOrDance in Pharo (World Menu -> DiscOrDance -> DiscOrDance
) and scrape and analyze the server.
The REVEAL DiscOrDance bot can be added on public servers. By sharing your server with us and the research community, also through DiscOrDance, you enable us and other researchers forking this project to investigate interesting insights in how developers interact in your community.
If you are an administrator of a Discord server about software development (e.g., programming languages, software projects, framework communities) interested in the analyses available through DiscOrDance or its extension, do not hesitate to contact wolfenmark via GitHub, us at REVEAL, or to open an issue/pull-request in this project.
DiscOrDance is a research tool and we are interested in new potential insights to improve software engineering practices among the community.
Adding the REVEAL DiscOrDance bot to a server allows us to mine its data. DiscOrDance uses the lowest number of permissions needed to accomplish its tasks. The bot needs only the read message history
permission, so it is safe to add to a public server (any user account can already mine the full history of a public server, although violating Discord’s ToS on bots).
When logged in Discord’s website with a server admin account, add the DiscOrDance public bot (DoD_Public) to the server by clicking here:
- Add Public Bot to Server
- Select the server of interest from the list and confirm. Requested permissions should include only
Read Message History
. - Confirm and authorize the following steps.
DiscOrDance has been used in the following publications:
- Riggio, E., Raglianti, M., & Lanza, M. (2023). Conversation Disentanglement As-a-Service. Proceedings of ICPC 2023 (31st International Conference on Program Comprehension), pages 59-63, IEEE.
- Raglianti, M., Nagy, C., Minelli, R., & Lanza, M. (2022). DiscOrDance: Visualizing Software Developers Communities on Discord. Proceedings of ICSME 2022 (38th International Conference on Software Maintenance and Evolution), pages 474-478, IEEE.
- Raglianti, M., Nagy, C., Minelli, R., & Lanza, M. (2022). Using Discord Conversations as Program Comprehension Aid. Proceedings of ICPC 2022 (30th International Conference on Program Comprehension), pages 597-601, ACM.
- Raglianti, M., Minelli, R., Nagy, C., & Lanza, M. (2021). Visualizing Discord Servers. Proceedings of VISSOFT 2021 (9th Working Conference on Software Visualization), pages 150-154, IEEE.
Additional documentation can be found in the form of research papers, presentations, and a demo clip on: https://discordance.si.usi.ch.
-
Make sure you are in a Pharo 8 image. DiscOrDance is currently compatible and tested only with Pharo 8. Porting to the latest version of Pharo is under evaluation but it means porting the main dependencies too (at the moment out of scope).
-
Additionally try to remove the
onWarning:
block from the Metacello import command to have a better understanding of the failures that may cause errors.
- Our tests indicate that to mine 200k messages it takes less than one hour (due to Discord API rate limitations and depending on the analyses performed). This timing may vary greatly depending on the messages present on the server but it should serve as a rule of thumb to identify potential problems slowing down the scraping process.
DiscOrDance is released under the MIT License. See LICENSE for details.
© Marco Raglianti (a.k.a. wolfenmark on GitHub). REVEAL @ Software Institute, Università della Svizzera italiana (USI), Lugano, Switzerland