Skip to content

DiscOrDance is a programmable interactive visualization tool to explore Discord servers of software development communities.

License

Notifications You must be signed in to change notification settings

USIREVEAL/DiscOrDance

Repository files navigation

DiscOrDance is a programmable interactive visualization tool to explore Discord servers of software development communities.
DiscOrDance Logo
DiscOrDance short demo animated gif.
DiscOrDance is a bot, a scraper, and a visualization tool developed in Pharo 8, aiming to support research in software engineering. After being added to a Discord server, the DiscOrDance bot can build an internal domain model of the server containing all the visible history. When model creation is complete, one can interactively explore authors, channels, messages and all the other classes in the domain model. Live inspection of an instance of a Discord server is enhanced by DiscOrDance with specific views targeted at progressively discover and understand the information contained in the selected server.

DiscOrDance is being developed by Marco Raglianti as part of his Ph.D. in Software Engineering.

Requirements

  • Pharo 8

Quickstart Guide: Using DiscOrDance from Pharo

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.

Create a Private Bot

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 the TOKEN (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, enable Server Member Intent and Message Content Intent and save the changes
  • Go to Oauth2 -> URL Generator and add bot scope and Read 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).

Add Token to Pharo

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.

Adding the REVEAL DiscOrDance Bot to a 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.

For Server Admins

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.

Privacy Notice

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).

Adding REVEAL DiscOrDance to the server

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.

Publications

DiscOrDance has been used in the following publications:

Additional Documentation

Additional documentation can be found in the form of research papers, presentations, and a demo clip on: https://discordance.si.usi.ch.

FAQ

I have errors when importing with Metacello or nothing is imported except the baseline

  • 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.

Approximate Scraping time

  • 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.

License and Contacts

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

About

DiscOrDance is a programmable interactive visualization tool to explore Discord servers of software development communities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published