Two things Twilight learned the days before the Grand Galloping Gala. One: don’t cast spells to force you to stay awake. Two: who knew Discord would make such a brilliant dance partner?
When Twilight royally messes up before the grand galloping gala she sits in agony at the thought of having to see the very nobles at the gala who saw her collapse. However, in this self-deprecation she least expected Discord to be a source of comfort.