Hi there, I have created a bot for discord before, just a simple music bot that my friends and I could listen to while we played Terraria.
From what I understand, you want a bot where you can specify a role and a message. Then the bot will forward this message to all the members of the server who match the relevant role via direct message. Discord bots are commonly written in Node.js, which is a modern version of javascript, we could use this to write the bot.
The members of each role could be kept in a CSV, TXT or XML file as a type of database. When the script is first run, it will create an array of JSON objects with the values of both role and the username, essentially just a list of the usernames with their roles. Then whenever you sent it a message in the following format for example:
Golden:This is a message
We could get the message and split the string on the comma so we would have now "Golden" and "This is a message".
The script would then look through the array of JSON objects and for each object with a role of Golden, look at the corresponding username and forward them a Direct message. In terms of the reply, essentially we will send any message that is not from one of your accounts to the bot directly to you. with the senders name as a tag.
I have 3 years of professional experience in the computer science field primarily through freelancing via Linked in. My primary experience is with cloud computing and Kubernetes.