refactor: some minor refactoring in the discord plugin too like moving the get component part into a function